• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using JBOSS optimistic tree cache and Websphere 6.1.0.13

 
Priya Venkatesan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JBOSS optimistic tree cache and Websphere 6.1.0.13

Hi,
While trying to use hibernate 3.2.5 with WAS 6.1.0.13 I am facing these issues:
My hibernate cfg file has the transaction manager set up to be
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup which is recommended while using hibernate with Websphere 6.1. I am using CMT transaction manager factory. However this gives me the error:

caused by: java.lang.UnsupportedOperationException
at
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.suspend(WebSphereExtendedJTATransactionLookup.java:111)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:78)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:80)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4241)
... 40 more

Then going through JBOSS discussion boards, I understood that I need to set the transaction manager to be org.hibernate.transaction.WebSphereTransactionManagerLookup
which is meant to be used for lower versions of websphere. By doing so, this error disppeared, however I got the following problem while using optimistic tree cache.

[1/25/08 11:49:45:664 PST] 00000029 RegisteredSyn E WTRN0074E: Exception caught frombefore_completion synchronization operation: org.jboss.util.NestedRuntimeException: ; -

nested throwable: (org.jboss.cache.lock.TimeoutException: write lock for / could not be

acquired after 15000 ms. Locks: Read lock owners: {}
Write lock owner: GlobalTransaction:<null>:1
(caller=GlobalTransaction:<null>:2, lock info: write owner=GlobalTransaction:<null>:1

(activeReaders=0, activeWriter=Thread[QTMSessionPool,5,], waitingReaders=0,

waitingWriters=1, waitingUpgrader=0)))
at

org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(

TxInterceptor.java:1022)
at

org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynch

ronizationHandler.java:72)
at

com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
at

com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2389)
at

com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1

622)
at

com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1593)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1528)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:237)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:162)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:756)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:181)
at

com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3910)
at

com.ibm.ejs.container.MessageEndpointHandler.afterDelivery(MessageEndpointHandler.java:1

353)
at

com.ibm.ejs.container.MessageEndpointHandler.invokeMessageEndpointMethod(MessageEndpoint

Handler.java:775)
at

com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:736)
at $Proxy0.afterDelivery(Unknown Source)
at

com.ibm.ws.sib.ra.inbound.impl.SibRaTransactionalDispatcher.afterDelivery(SibRaTransacti

onalDispatcher.java:468)
at

com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:720)
at

com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProce

ssListener.java:584)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:418)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: org.jboss.cache.lock.TimeoutException: write lock for / could not be acquired

after 15000 ms. Locks: Read lock owners: {}
Write lock owner: GlobalTransaction:<null>:1
(caller=GlobalTransaction:<null>:2, lock info: write owner=GlobalTransaction:<null>:1

(activeReaders=0, activeWriter=Thread[QTMSessionPool,5,], waitingReaders=0,

waitingWriters=1, waitingUpgrader=0))
at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:169)
at org.jboss.cache.TreeNode.acquireWriteLock(TreeNode.java:546)
at org.jboss.cache.TreeNode.acquire(TreeNode.java:506)
at

org.jboss.cache.interceptors.OptimisticLockingInterceptor.lockNodes(OptimisticLockingInt

erceptor.java:141)
at

org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterc

eptor.java:68)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
at

org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:754)
at

org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(

TxInterceptor.java:1000)
... 21 more

Can somebody tell me what is wrong?

Thanks,
Priya
 
Paul Santa Maria
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI -

You start out talking about one error (which turned out to be configuration), then go on to ask about a completely different error.

I'd suggest the following:
1. Make sure your basic configuration is OK
Specifically, create some "hello world" JSPs to verify that you can successfully:
a) Read from your database(s)
b) Update (insert, update and/or delete) your database
c) Make sure you can successfully update in the context of a transaction

2. At that point, I'd try to identify the party that's holding the
lock you're trying to acquire (what else is being updated concurrently)?

3. Failing all else, you can always adjust "LockAcquisitionTimeout".

But I'd definitely try to better understand the problem first...

'Hope that helps .. PSM
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic