-
1. Re: CacheLoader saves but rollbacks
chtimi2 Nov 2, 2009 10:52 AM (in response to chtimi2)Oops, i didn't post the config. There really should be an edit button. '
<?xml version="1.0" encoding="UTF-8"?> <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2"> <transaction transactionManagerLookupClass="hellotrackworld.impl.srv.AtomikosTransactionManagerLookup"/> <locking isolationLevel="SERIALIZABLE" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="pessimistic" writeSkewCheck="false" concurrencyLevel="500"/>
-
2. Re: CacheLoader saves but rollbacks
chtimi2 Nov 2, 2009 10:57 AM (in response to chtimi2)Sorry, my connection is so poor that i'm not even able to post a XML config. I'll try again tomorrow.
-
3. Re: CacheLoader saves but rollbacks
chtimi2 Nov 3, 2009 3:50 AM (in response to chtimi2)At last here is the complete replSync-service.xml. Sorry for the inconvenience.
<?xml version="1.0" encoding="UTF-8"?> <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2"> <transaction transactionManagerLookupClass="hellotrackworld.impl.srv.AtomikosTransactionManagerLookup"/> <locking isolationLevel="SERIALIZABLE" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="pessimistic" writeSkewCheck="false" concurrencyLevel="500"/> <loaders passivation="false" shared="false"> <preload> <node fqn="/"/> </preload> <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false"> <properties> cache.jdbc.table.name=jbosscache cache.jdbc.table.create=true cache.jdbc.table.drop=true cache.jdbc.table.primarykey=jbosscache_pk cache.jdbc.fqn.column=fqn cache.jdbc.fqn.type=VARCHAR(255) cache.jdbc.node.column=node cache.jdbc.node.type=BINARY cache.jdbc.parent.column=parent cache.jdbc.driver=org.hsqldb.jdbcDriver cache.jdbc.url=jdbc:hsqldb:hsql://localhost/jbc cache.jdbc.user=sa cache.jdbc.password= </properties> </loader> </loaders> </jbosscache>
-
4. Re: CacheLoader saves but rollbacks
chtimi2 Nov 3, 2009 4:09 AM (in response to chtimi2)If i comment the following:
TransactionManager tm = Spring.getBean ( TransactionManager.class , "atomikosTransactionManager" ); cache.getCache().getConfiguration().getRuntimeConfig().setTransactionManager(transactionManager);
the behaviour is completely different:
-instead of a single transaction spanning all operations between a SET AUTOCOMMIT FALSE and ROLLBACK, the log file structure is more complicated, including many SET AUTOCOMMIT FALSE and SET AUTOCOMMIT TRUE. More importantly there is no ROLLBACK at the end.
-consequently the data is really persisted
So, it works with the default, local transaction manager, but not with a JTA TM (Atomikos) .. -
5. Re: CacheLoader saves but rollbacks
galder.zamarreno Nov 30, 2009 3:26 AM (in response to chtimi2)Maybe you wanna try with JBoss Transactions which is a JTA TM as well? To try, download or set correct dependencies to JBoss Transactions (see jbc trunk for example) and use http://anonsvn.jboss.org/repos/jbosscache/core/trunk/src/main/java/org/jboss/cache/transaction/JBossStandaloneJTAManagerLookup.java lookup class. That class also shows how to get hold of a JBoss Transaction TM in a standalone environment.
-
6. Re: CacheLoader saves but rollbacks
chtimi2 Dec 2, 2009 10:11 AM (in response to chtimi2)Thanks for the reply, it's nice that someone reads these "old" messages.
I have temporarily stopped working on the persistence aspect, but yes i could try with JBossTS when i'm back on it. -
7. Re: CacheLoader saves but rollbacks
chtimi2 Dec 2, 2009 10:15 AM (in response to chtimi2)Now that i think about it, has JBC been tested with Atomikos, or TransactionManagers other than JBossTS?
-
8. Re: CacheLoader saves but rollbacks
galder.zamarreno Jan 11, 2010 3:06 AM (in response to chtimi2)We don't currently test Atomikos but we're open to contributions from the community to include it amongst the transaction managers that we test