Sorry if I reply on dev-list. If you can help me because I don't understand. I have
In class AppModule I added binder.bind(ApplicationManager.class), and I want it as Service. I added, as you tell me, the method eagerLoad(), but it nothing happens. In class ApplicationManager there is a method init() that initializes the whole application, such as the structures, the observer etc... and starts it. But I think I'm getting something wrong, because it nothing happens. Thank you very much. 2014-02-13 19:11 GMT+01:00 Thiago H de Paula Figueiredo <thiag...@gmail.com> : > On Thu, 13 Feb 2014 14:43:46 -0200, Domenico Fiorilli < > domenicofiori...@gmail.com> wrote: > > Hi, >> > > Hi! > > This question should have been posted in the users mailing list, not the > dev one, so I'm answering in the users one. :) > > > I'm developing on application in Tapestry and I have this problem: >> I have some classes in java that they need to use a HibernateSession. I >> read that to do that, those classes must be execute as well as Services. >> But those classes have to start automatically after Tapestry bootstrap, >> and this doesn't happend. >> > > That's expected. All Tapestry-IoC services are lazy initialized by > default, and that's a blessing. :) > > If you're using autobinding, just add .eagerLoad(): > binder.bind(Service.class, ServiceImpl.class).eagerLoad(); > > If you're not, just add @EagerLoad to the method that builds your service: > > @EagerLoad > public static Service buildService(...) { ... } > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > -- *Domenico Fiorilli* *Dottore in Ingegneria Informatica* *via Marconi 33Pontecagnano (SA)**3932855726* *domenicofiori...@gmail.com <domenicofiori...@gmail.com>* *http://domenicofiorilli.jimdo.com/* <http://domenicofiorilli.jimdo.com/>