-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Do I use JoinableCMTTransactionFactory correctly?
PostPosted: Wed Aug 22, 2007 11:42 pm 
Newbie

Joined: Tue Dec 19, 2006 4:14 am
Posts: 8
I try to use JPA and JTA on JBoss 4.0.4 GA.

When the persistent unit is configured to use org.hibernate.transaction.JTATransactionFactory, I got a warning message say that "[org.hibernate.ejb.AbstractEntityManagerImpl] Cannot join transaction, not a JoinableCMTTransaction". The data can not be inserted into the database.

So I change to use JoinableCMTTransactionFactory as the value of hibernate.transaction.factory_class property. I got another warning message "[org.hibernate.ejb.Ejb3Configuration] Overriding hibernate.transaction.factory_class is dangerous, this might break the EJB3 specification implementation", but this time the data in the database can be inserted or updated.

Does someone kindly tell me if the above usage of JoinableCMTTransactionFactory is appropriate?

Thanks.

the following is the content of persistent xml file
Code:
   <persistence-unit name="conf-jta" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>jtaDataSource</jta-data-source>
      <properties>
         <property name="hibernate.hbm2ddl.auto" value="create-update"/>
         <property name="hibernate.format_sql" value="true" />
         <property name="hibernate.use_sql_comments" value="true" />

         <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
         <property name="hibernate.cache.use_query_cache" value="true" />

         <property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory" />
         <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
      </properties>
   </persistence-unit>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 4:33 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
What does your *-ds.xml look like? Why are you using EJB3 on 4.0.4? Upgrade to 4.2.1 if you can!

-Chris

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.