Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jboss/mysql cmp deadlock?

Reply
Thread Tools

jboss/mysql cmp deadlock?

 
 
Michael Lim
Guest
Posts: n/a
 
      09-23-2004
hi folks,

has anyone run into ejb cmp deadlock with jboss/mysql? i can
reproduce this fairly easily by simply clicking on various links that
i know will access the database as a single user.

i've heard of turning off method transaction, or changing the CMP
entity bean commit option to commit-option "A". would like to know if
these are the only available options to tune this, or there's other
proper workaround or config tuning for this to avoid this deadlock.

the app i have is a very straightfoward application, and there's no
need for transactions, and currently jboss is the only entry point to
mysql to modify data.

i'm running jboss 3.2.3 with mysql 4.0.18.

here's part of my deadlock exception/stack trace.

thank you all very much for any help or info in advance.

michael lim
http://www.velocityreviews.com/forums/(E-Mail Removed)

2004-09-23 14:37:01,025 ERROR [com.myapp.action.ShowGBParentAction]
org.jboss.util.deadlock.ApplicationDeadlockExcepti onexception caught:
org.jboss.util.deadlock.ApplicationDeadlockExcepti on: Application
deadlock detected, resource=org.jboss.ejb.plugins.lock.QueuedPessimis ticEJBLock@21cf9c,
bean=User, id=2D0F93A70A0A0A01019829A918E37D02, refs=2,
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=gb-app-srv01//1635,
BranchQual=], synched=Thread[TP-Processor2,5,jboss], timeout=5000,
queue=[], holder=TransactionImpl:XidImpl [FormatId=257,
GlobalId=gb-app-srv01//1633, BranchQual=],
waitingResource=org.jboss.ejb.plugins.lock.QueuedP essimisticEJBLock@1c5130a,
bean=User, id=B06A31EE0A0A0A01005911710AE8D2EC, refs=2,
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=gb-app-srv01//1633,
BranchQual=], synched=null, timeout=5000, queue=[TXLOCK
waitingTx=TransactionImpl:XidImpl [FormatId=257,
GlobalId=gb-app-srv01//1635, BranchQual=] id=0
thread=Thread[TP-Processor8,5,jboss] queued=true],
waitingResourceHolder=TransactionImpl:XidImpl [FormatId=257,
GlobalId=gb-app-srv01//1633, BranchQual=]
org.jboss.util.deadlock.ApplicationDeadlockExcepti on: Application
deadlock detected, resource=org.jboss.ejb.plugins.lock.QueuedPessimis ticEJBLock@21cf9c,
bean=User, id=2D0F93A70A0A0A01019829A918E37D02, refs=2,
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=gb-app-srv01//1635,
BranchQual=], synched=Thread[TP-Processor2,5,jboss], timeout=5000,
queue=[], holder=TransactionImpl:XidImpl [FormatId=257,
GlobalId=gb-app-srv01//1633, BranchQual=],
waitingResource=org.jboss.ejb.plugins.lock.QueuedP essimisticEJBLock@1c5130a,
bean=User, id=B06A31EE0A0A0A01005911710AE8D2EC, refs=2,
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=gb-app-srv01//1633,
BranchQual=], synched=null, timeout=5000, queue=[TXLOCK
waitingTx=TransactionImpl:XidImpl [FormatId=257,
GlobalId=gb-app-srv01//1635, BranchQual=] id=0
thread=Thread[TP-Processor8,5,jboss] queued=true],
waitingResourceHolder=TransactionImpl:XidImpl [FormatId=257,
GlobalId=gb-app-srv01//1633, BranchQual=] at
org.jboss.util.deadlock.DeadlockDetector.deadlockD etection(DeadlockDetector.java:4 at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLoc k.waitForTx(QueuedPessimisticEJBLock.java:301) at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLoc k.doSchedule(QueuedPessimisticEJBLock.java:236) at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLoc k.schedule(QueuedPessimisticEJBLock.java:183) at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke (EntityLockInterceptor.java:85) at
org.jboss.ejb.plugins.EntityCreationInterceptor.in voke(EntityCreationInterceptor.java:54) at
org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:84) at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:267) at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:12 at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:11 at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:191) at
org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122) at
org.jboss.ejb.EntityContainer.internalInvoke(Entit yContainer.java:489) at
org.jboss.ejb.Container.invoke(Container.java:700) at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory. invoke(BaseLocalProxyFactory.java:375) at
org.jboss.ejb.plugins.local.EntityProxy.invoke(Ent ityProxy.java:3 at
$Proxy82.getProviderrating(Unknown Source) at
com.myapp.serviceProviders.ServiceProviderManagerB ean.getProviderRating(ServiceProviderManagerBean.j ava:309) at
com.myapp.serviceProviders.ServiceProviderManagerB ean.getRating(ServiceProviderManagerBean.java:381) at
sun.reflect.GeneratedMethodAccessor87.invoke(Unkno wn Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:324) at
org.jboss.ejb.StatelessSessionContainer$ContainerI nterceptor.invoke(StatelessSessionContainer.java:6 83) at
org.jboss.resource.connectionmanager.CachedConnect ionInterceptor.invoke(CachedConnectionInterceptor. java:185) at
org.jboss.ejb.plugins.StatelessSessionInstanceInte rceptor.invoke(StatelessSessionInstanceInterceptor .java:72) at
org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:84) at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:267) at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:12 at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:11 at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:191) at
org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122) at
org.jboss.ejb.StatelessSessionContainer.internalIn voke(StatelessSessionContainer.java:331) at
org.jboss.ejb.Container.invoke(Container.java:700) at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory. invoke(BaseLocalProxyFactory.java:375) at
org.jboss.ejb.plugins.local.StatelessSessionProxy. invoke(StatelessSessionProxy.java:83) at
$Proxy106.getRating(Unknown Source) at
com.myapp.directories.DirectoryManagerBean.getGBPr oviderRating(DirectoryManagerBean.java:322) at
com.myapp.directories.DirectoryManagerBean.getGBPr oviderRatings(DirectoryManagerBean.java:816) at
sun.reflect.GeneratedMethodAccessor195.invoke(Unkn own Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:324) at
org.jboss.ejb.StatelessSessionContainer$ContainerI nterceptor.invoke(StatelessSessionContainer.java:6 83) at
org.jboss.resource.connectionmanager.CachedConnect ionInterceptor.invoke(CachedConnectionInterceptor. java:185) at
org.jboss.ejb.plugins.StatelessSessionInstanceInte rceptor.invoke(StatelessSessionInstanceInterceptor .java:72) at
org.jboss.ejb.plugins.AbstractTxInterceptor.invoke Next(AbstractTxInterceptor.java:84) at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran sactions(TxInterceptorCMT.java:267) at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn terceptorCMT.java:12 at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(S ecurityInterceptor.java:11 at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:191) at
org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122) at
org.jboss.ejb.StatelessSessionContainer.internalIn voke(StatelessSessionContainer.java:331) at
org.jboss.ejb.Container.invoke(Container.java:700) at
sun.reflect.GeneratedMethodAccessor115.invoke(Unkn own Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:324) at
org.jboss.mx.capability.ReflectedMBeanDispatcher.i nvoke(ReflectedMBeanDispatcher.java:284) at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:546) at
org.jboss.invocation.local.LocalInvoker.invoke(Loc alInvoker.java:101) at
org.jboss.invocation.InvokerInterceptor.invoke(Inv okerInterceptor.java:90) at
org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:46) at
....
....
 
Reply With Quote
 
 
 
 
chunnu
Guest
Posts: n/a
 
      03-16-2005
when EJBs do load or store operations, they will lock the database in some
levels. If one ejb needs to lock two resources and it gets one, but
another ejb requires those two resources but it gets another. Then they
are waiting for another to release the resource locked by another. The
exception will occur if the time is out.
Maybe you should check the code to prevent those things from happening

 
Reply With Quote
 
 
 
 
chunnu
Guest
Posts: n/a
 
      03-16-2005
when EJBs do load or store operations, they will lock the database in some
levels. If one ejb needs to lock two resources and it gets one, but
another ejb requires those two resources but it gets another. Then they
are waiting for another to release the resource locked by another. The
exception will occur if the time is out.
Maybe you should check the code to prevent those things from happening

 
Reply With Quote
 
chunnu
Guest
Posts: n/a
 
      03-16-2005
when EJBs do load or store operations, they will lock the database in some
levels. If one ejb needs to lock two resources and it gets one, but
another ejb requires those two resources but it gets another. Then they
are waiting for another to release the resource locked by another. The
exception will occur if the time is out.
Maybe you should check the code to prevent those things from happening

 
Reply With Quote
 
Heiko W. Rupp
Guest
Posts: n/a
 
      03-17-2005
chunnu wrote:
> Maybe you should check the code to prevent those things from happening


Jboss also offers the "Instance per Tx" container configuration.

--
Heiko W. Rupp (E-Mail Removed)
JBoss Buch: http://www.dpunkt.de/buch/3-89864-318-2.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no cmp field defined in cmp ejb Andrea Sansottera Java 0 07-16-2004 02:24 PM
EJB w/ CMP 2.0 - where does it store the datasource & table David Thielen Java 0 08-15-2003 11:01 PM
Record (Row) locking auto-magically with CMP? Tom Purvis Java 1 08-09-2003 04:33 AM
Automate EJB 2.0 CMP generation from Datasource Andrew Tyson Java 0 07-15-2003 12:44 PM
CMR/CMP and Compound Primary Key Damir Mikoc Java 1 07-04-2003 03:27 AM



Advertisments