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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org