[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Transactions in Hibernate and JBoss

MichaelCouck do-not-reply at jboss.com
Thu Jul 27 03:42:11 EDT 2006


Hi,

There seems to be some conflict in the documentation for getting the Hibernate transaction and the server transaction synchronised.

We have a typical setup for Hibernate using the hibernate.cfg.xml where we map all the Pojos and so on. Then we access Hibernate by the getCurrentSession() method to get the session. We don't close the session anywhere of course as we assumed that it would be closed by the JBoss. I will say that we don't use the MBean for Hibernate.

Is the Hibernate session, and more specifically the Hibernate transaction in fact managed by the JBoss. I seem to think that the only way to put the Hibernate session in the JBoss transaction is via the MBean, then lookup the SessionFactory via JNDI.

Please could someone point me in the right direction, perhaps with a step by step tutorial as an example, and documentation.

Thanks in advance.

Mike

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961197#3961197

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961197



More information about the jboss-user mailing list