Dear All,
Supposing the transaction is to be managed by container (CMT), as advised by the hibernate team and this forum participant , there is no need to write any code to perform the client-demarcated JTA JNDI lookup such as
UserTransaction tx=(UserTransaction) ctx.lookup("UserTransaction");
I am a bit confused as to whether the session obtaind through SessionFactory JNDI look up is a must in order to perform query and normal business logic execution .Eventhough I do think if you need to execute hibernate related process , you must obtane a session to do the work. and I have success with CMT thorugh session lookup , without writting any single code for the transaction management for either EJB or Hibernate
Some one also suggest to me that [u]session is build up the trans[/u]action , [u]Transaction lifecycle exists much longer than session[/u]. Could any one qualify the statement please.
Thanks
|