Onno, The thing to know about tapestry-hibernate is that it creates a proxy for the actual hibernate session. When you use the injected session it actually gets the session for the current thread, via the HibernateSessionManager I believe. So when you instantiate your DAO with a session in the constructor, they will always get the session for the current thread transparently.
Onno Scheffers wrote: > Hi, > > I am having some troubles figuring out the proper way to use DAO services > using tapestry-hibernate. The documentation describes how to write the DAO > service interfaces and how to register them, but it doesn't show an example > of an actual DAO implementation. > > As far as I know I cannot inject a Hibernate Session into the DAO service > implementation, so I must create a constructor for that. > If I do that it works fine, but every example I was able to find (not many!) > seem to use the default scope for the DAO service, which is singleton. It > works on my local machine, but I don't quite understand how this would work > in a multi-user, multi-threaded environment. Shouldn't the scope be > perthread? > > Does anyone have a bit of example code for a DAO interface, its > implementation and the way they are registered in the AppModule? > > > regards, > > Onno > > -- http://thegodcode.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]