It's a proxied service and the only one persisted. The debugger I mentioned before is XRebel, and it shows that the stored service holds a reference to both a token (ServiceProxyToken) and a creator (JustInTimeObjectCreator). The main issue here seems to be that the latter references registryShutdownHub (RegistryShutdownHubImpl) through a chain of properties, whose listeners array essentially references the entire registry. Is what I'm seeing just a defect of a freshly-out-of-beta tool or is it possible that persisting a service can carry a ~50MB (!) penalty to the session?
Mihkel On 26 June 2014 19:16, Cezary Biernacki <cezary...@gmail.com> wrote: > Do you use proxied service, i.e. one defined as an interface (e.g. via > binder.bind(MyService.class, MyServiceImpl.class), not a concrete class? > > If your service is defined as a concrete class, its instance is used > directly. In such case it will be serialised using normal Java rules. > > Best regards, > Cezary > > > On Thu, Jun 26, 2014 at 4:31 PM, Mihkel Jõhvik <mihkeljoh...@gmail.com> > wrote: > > > Hi > > > > Maybe someone can help alleviate my confusion. I gather (from reading > > https://tapestry.apache.org/service-serialization.html) that IoC > services, > > when persisted, are done so using tokens. > > > > If a service is passed to a POJO and that POJO stored in a session using > > the @Persist annotation, that behaviour does not change, correct? > > > > The reason I'm asking: I'm currently looking at the session with two > > different profiling tools, one of which claims that the entire object > graph > > of the service has been stored. > > > > Mihkel > > >