Atomikos Forum

Atomikos transactions with Hibernate and a separate Jbosscache

Hi

I am using Atomikos transaction manager with JBosscache and Hibernate. 

I have injected java TransactionManager into the JBosscache as stated in their documentation.  Hibernate looks up the transactionManager using the properties configuration.


The following is what I have for test purposes:

1. I programatically start a Java Transaction.
2. I do two things:
  a. I save an object into JBosscache programmatically using "put" operation. 
  b. Then I call my PersonDaoImpl to save a "Person" object.
3. Finally I commit the Java Transaction.

Now this is what has happened according to the log file:

1.  The object is saved in the table. I verified it in the table.
2.  After the transaction state has entered in the "TERMINATED" state, then the JBossCache tried to commit the changes.  However, there is no transaction at this point.  JBossCache gives the following error:
- Received JTA STATUS_UNKNOWN in afterCompletion()!  XA resources may not be in sync


Can any one shed light on this?


thanks
sonam Send private email
Friday, November 19, 2010
 
 
What versions are you using?
Guy Pardon Send private email
Saturday, November 20, 2010
 
 
I am using Atomikos 3.6.5 with Hibernate 3.3.2.GA and JBoss Cache 3.2.1.

When using a Oracle database, only the JBoss Cache is rolling
back after encountering a JTA STATUS_UKNOWN. 
However, when I tested with a MySQL database the JBoss Cache is committing fine. 

I even gave on the Oracle DB the "grant execute on sys.dbms_system to <username>;" and still does not work with OracleDB.

thanks
sonam Send private email
Monday, December 06, 2010
 
 
I noticed that on documentation from JBoss <a href="http://docs.jboss.org/jbosscache/3.2.1.GA/faq_en/html/TreeCache.html#d0e453">http://docs.jboss.org/jbosscache/3.2.1.GA/faq_en/html/TreeCache.html#d0e453</a> that JBoss Cache currently does not participate in XA Transactions.  Could this have anything to do with the XA transaction not working?

thanks
sonam Send private email
Monday, December 06, 2010
 
 
Did you see/try this?

http://bit.ly/hNjMXf

HTH
Guy Pardon Send private email
Tuesday, December 07, 2010
 
 
I am not using JBoss Cache as a 2nd Level cache for Hibernate.  I am using JBoss Cache as a separate entity for storing my own objects/data.
sonam Send private email
Tuesday, December 07, 2010
 
 
Then I can't help, sorry. Would you have access to a budget for developer access? Then we could scan through the logs and provide some more one-on-one support...

Best
Guy Pardon Send private email
Wednesday, December 08, 2010
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics