I'm guessing the reason why you can't inject the Session is exactly for the reason you stated - how do you inject it if you don't want it to be created?
Can't say I've ever explicitly needed the Session obj myself - see here: http://tapestry.apache.org/session-storage.html As to why it's in the service package - well, I could ask the same of the @Traditional and @Core annotations. I guess because they relate to services if not actually a T5 service themselves. Steve. On 25 January 2013 00:03, Matías Blasi <matias.bl...@gmail.com> wrote: > Hi all! > > I'm a little stuck with trying to inject the Tapestry Session Service > (org.apache.tapestry.services.Session) > > I simply added in my page: > > @Inject > private Session session; > > I'm getting: > > Caused by: java.lang.RuntimeException: No service implements the interface > org.apache.tapestry5.services.Session. > at > org.apache.tapestry5.ioc.internal.RegistryImpl.getServiceByTypeAlone(RegistryImpl.java:664) > at > org.apache.tapestry5.ioc.internal.RegistryImpl.getServiceByTypeAndMarkers(RegistryImpl.java:684) > at > org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:643) > at > org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:47) > at > org.apache.tapestry5.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:43) > at $InjectionProvider2_ac1a0adc404.provideInjection(Unknown Source) > at $InjectionProvider2_ac1a0adc3d0.provideInjection(Unknown Source) > at > org.apache.tapestry5.internal.transform.InjectWorker$2.run(InjectWorker.java:73) > ... 127 more > > Is there any particular thing with the session service? > > I was able to get it by injecting the Request service, and asking for the > session through it (with no forced creation), and it worked! I browsed into > the code, and it is asking for the session to the TapestrySessionFactory > service... > > If we cannot @Inject the Session, should it be in the .services interfaces > package? > > Regards, > Matias. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org