And obviously, I meant "every service that it somehow depends on" instead of the other thing which is not true.

Op 22-11-2010 0:34, Tom van Dijk schreef:
Well, no, you will see that a lot of services depend on each other, so in order to create an object that just happens to depend on stuff like object providers, many other services need to be created. This is not an inefficiency in Tapestry (The services are first only "virtual" before they are realized) but it may be that the lifecycle it not efficient in guice/tapestry integration as it is in tapestry.

When you ask for a service, every service that somehow depends on it (via field/constructor initialization) is created as a VIRTUAL object. Then when they are actually used (you call a method) they are REALIZED (by the virtual proxy object). This is why it's not inefficient to create all these virtual proxies. That part is easy. And when they are actually used, well, then you need to have the realized object anyway, so it's still efficient.

Op 21-11-2010 23:59, Sebastian Hennebrueder schreef:
Hello,

I added an object provider to integrate the Guice IOC Framework. Though I have added it at the end, it is called for many Tapestry related pieces. Is this not a very big inefficiency?

my integration stuff in AppModule
public static void contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration) { configuration.add("GuiceObjectProvider", new GuiceObjectProvider(), "after:*");
    }


Here is the list of services asked to build:

23:56:54,194 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.PipelineBuilder 23:56:54,224 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.PropertyShadowBuilder 23:56:54,243 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.RequestGlobals 23:56:54,263 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.ApplicationGlobals 23:56:54,270 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.ChainBuilder 23:56:54,275 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.Environment 23:56:54,280 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.StrategyBuilder 23:56:54,285 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.PropertyAccess 23:56:54,293 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.Request 23:56:54,311 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.Response 23:56:54,318 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.EnvironmentalShadowBuilder 23:56:54,323 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.internal.services.EndOfRequestEventHub 23:56:54,335 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.DefaultImplementationBuilder 23:56:54,345 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.TypeCoercer 23:56:54,346 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.ComponentClassResolver 23:56:54,362 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.Request 23:56:54,384 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.internal.services.ComponentInstantiatorSource 23:56:54,389 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.UpdateListenerHub 23:56:54,407 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.services.RequestGlobals 23:56:54,408 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.internal.services.ComponentClassTransformer 23:56:54,412 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.internal.services.InternalRequestGlobals 23:56:54,417 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.ClasspathURLConverter 23:56:54,434 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.internal.services.ComponentInstantiatorSource 23:56:54,435 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.ClassNameLocator 23:56:54,445 DEBUG GuiceObjectProvider:24 - guice asked to provide: interface org.apache.tapestry5.ioc.services.ClasspathURLConverter



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to