RE: About per-thread service

2012-05-30 Thread Lance Java
registry, how can it be thread safe? A. It's a proxy which delegates to a lazy loaded session on a thread local -- View this message in context: http://tapestry.1045711.n5.nabble.com/About-per-thread-service-tp5713515p5713523.html Sent from the Tapestry - User mailing list archive at Nabbl

RE: About per-thread service

2012-05-30 Thread Fight Ice
The @Scope(ScopeConstants.PERTHREAD) makes the service per-thread, and finally the SessionFactory.openSession() will be called(SessionFactory is thread safe). One session for one thread(request)?

Re: About per-thread service

2012-05-30 Thread Lance Java
actually create // a session until we first try to access it, then the session continues to exist for the // rest // of the request. return propertyShadowBuilder.build(sessionManager, "session", Session.class); } -- View this message in context: http://tapestry.104571

About per-thread service

2012-05-30 Thread Fight Ice
I have read the source code of HibernateCoreModule.java and HibernateSessionManagerImpl.java . The HibernateSessionManager service is per-thread, but I didn't find any code for concurrency(like using ThreadLocal). How Tapestry make HibernateSessionManager service to be per-thread.