-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate doesn't work with JTA
PostPosted: Sat Jun 23, 2007 8:36 am 
Newbie

Joined: Sat Jun 23, 2007 8:19 am
Posts: 2
Hi

Here's my persistence.xml file:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="airportPU" transaction-type="JTA">
       <jta-data-source>
          java:/OracleDS
       </jta-data-source>
       <properties>
          <property name="hibernate.current_session_context_class" value="org.hibernate.context.JTASessionContext" />
         <property name="hibernate.transaction.flush_before_completion" value="true" />
         <property name="hibernate.transaction.auto_close_session" value="true" />
          <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory" />   
          <property name="hibernate.hbm2ddl.auto" value="update" />
          <property name="hibernate.show_sql" value="true" />
          <property name="jboss.entity.manager.jndi.name" value="java:/EntityManager" />      
          </properties>
  </persistence-unit>
</persistence>


As you can see I use JTATransactionFactory. The problem is that there are no changes in db! when I use default TransactionFactory changes are visible. With JTATransactionFactory I have to flush() on entityManager which is not good work around for me. Is there any solution so that changes will be affected with jta?

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 23, 2007 6:13 pm 
Senior
Senior

Joined: Tue Jun 12, 2007 4:49 pm
Posts: 127
Location: India
Kindly provide the details as per the forum format.

Let us know more about your architecture. As in who is controlling the transactions?

Regards,
Jitendra


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 24, 2007 2:32 pm 
Newbie

Joined: Sat Jun 23, 2007 8:19 am
Posts: 2
I am using JBOss 4.0.5 GA with Hibernate EntityManager 3.20. GA.
No matter what kind of tx management I use - CMT/BMT the effect is the same. Database is oracle 10g xe.

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 26, 2007 3:35 pm 
Senior
Senior

Joined: Tue Jun 12, 2007 4:49 pm
Posts: 127
Location: India
This does not help.

There are some differences between JDBCTransaction(default) and JTATransaction.

Can you turn on the debug logging for org.hibernate and paste it here?

Regards,
Jitendra


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.