Yippppeeeeeeeee!!!!
I have solved the problem!!!
Actually I should have used an XADataSource for the underlying database to use
global transactions for the cache.
The clue of the problem was in comments of
TxInterceptor.RemoteSynchronizationHandler.afterCompletion()
- // this should really not be done here -
// it is supposed to be post commit not actually run the commit
Actually in 2-phase commit, the transaction would already have been committed,
so there is no way that connection.commit() would be called in
CacheStoreInterceptor.
I would recommend that this should be included as a part of the faq or jboss
cache tutorials - that whenever we are using a backing store with application
server's TransactionManager, we should always use an XADataSource.
<attribute name="CacheLoaderConfiguration">
| <config>
| <passivation>false</passivation>
| <preload>/</preload>
| <shared>true</shared>
| <cacheloader>
|
<class>org.jboss.cache.loader.JDBCCacheLoader</class>
| <properties>
| cache.jdbc.table.name=jbosscache
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=false
|
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=blob
| cache.jdbc.parent.column=parent
|
cache.jdbc.datasource=AshleyCacheDataSource
| </properties>
| <async>false</async>
|
<fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| </cacheloader>
| </config>
| </attribute>
OR
<attribute name="CacheLoaderConfiguration">
| <config>
| <passivation>false</passivation>
| <preload>/</preload>
| <shared>true</shared>
| <cacheloader>
|
<class>org.jboss.cache.loader.JDBCCacheLoader</class>
| <properties>
| cache.jdbc.table.name=jbosscache
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=false
|
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=blob
| cache.jdbc.parent.column=parent
|
cache.jdbc.driver=oracle.jdbc.xa.client.OracleXADataSource
|
cache.jdbc.url=jdbc:oracle:thin:@localhost:1521:ACRMDEV
| cache.jdbc.user=FASTDEV
| cache.jdbc.password=fastdev123$
| </properties>
| <async>false</async>
|
<fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| </cacheloader>
| </config>
| </attribute>
Took me 2 days for this problem but I must say it was a wonderful experience
and great sleuthing ;)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025417#4025417
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025417
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user