4 Replies Latest reply on Sep 15, 2011 4:02 AM by guinotphil

    Question about JBossTransactionManagerLookup

    guinotphil

      Hello,

       

      The JBoss 7 documentation say that in persistence.xml we should no longer use the following properties:

       

      <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>

       

       

      I guess JBoss comes with mechanisms that will automatically use the TransactionManager that has the JNDI name java:jboss/TransactionManager

       

      The use of JBossTransactionManagerLookup would be actually a problem as it tells to use the JNDI name java:TransactionManager.

       

       

      However, I have an application which use jBPM that require a hibernate.cfg.xml file (and not a persitence.xml) to create a SessionFactory. In the hibernate.xfg.xml file I had to disable the transaction.manager_lookup_class property as well because it couldn't find the TransactionManager on the JN DI instead...

      But, without a lookup class, will hibernate be able to find the transaction manager ? As the SessionFactory does not seem to be managed by any AS mechanism, I guess no. So, do I have to implement a JBoss7TransactionManagerLookup class to tell hibernate to look-up to java:jboss/TransactionManager on JNDI ?

       

      Thank you for your help