[jboss-user] [JBoss Cache: Core Edition] - Problems with Transaction Manager

fatboysuns do-not-reply at jboss.com
Fri Jan 30 15:48:37 EST 2009


Hi,
My app uses Spring and Jta for database transactions and I am trying some transaction configuration for my cache to work along with that ,
I am facing a couple of problems when doing that.
1. I saw specific mentions of JBossTransactionManagerLookup being the default transaction manager of Jboss cache.  When using it as TransactionManagerLookupClass, I get a  
java.lang.ClassCastException: org.jboss.tm.TxManager. 
When trying to import I saw JBossTransactionManagerLookup available in 2 packages ie, org.jboss.cache.transaction.JBossTransactionManagerLookup and import org.hibernate.transaction.JBossTransactionManagerLookup. I get a class cast when using both. 

2. When specifying the transactionManagerClass as the GenericTransactionManager, The application complains of having transaction Manager already registered to the Dummy transaction Manager. The exception is binding of DummyTransactionManager failed
javax.naming.NameAlreadyBoundException.

I am not specifying the dummy transaction manager anywhere. When I did step thru the cache code, i couldnt find any place where jboss cache was setting this. However when I specify no transactionManagers the actual value set in the transactionManager of cache class was null. I am very confused. I cant set it after creation of the cache too as this is not a dynamic property. I am not sure What I have to do. My configuration setting is very simple

String tmlc = JBossTransactionManagerLookup.class.getName();
		configuration.setTransactionManagerLookupClass(tmlc);
		  configuration.setIsolationLevel(IsolationLevel.READ_COMMITTED);
		configuration.setCacheMode(CacheMode.REPL_SYNC);
		configuration.setLockParentForChildInsertRemove(true);
		configuration.setLockAcquisitionTimeout(15000);

I Saw some other posts mentioning the same problem. I am not sure what is wrong ? Any help to resolve this is much appreciated.

Regards
Sundar

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

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



More information about the jboss-user mailing list