• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

weblogic.ejb20.locks.LockTimedOutException

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have an entity bean for which I have defined the Transaction attribute as (REQUIRES_NEW) in the deployment descriptor for all the method this is needed to prevent concurrency issues. But when I call any method on this Entity bean I get the following exception :
weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:TableSequences with primary key:Maya_Test timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Name=[EJB com.sanjiv.ejb.prototype.TableSequencesBeanCMP.getNextKeyAfterIncrementingBy(int)],Xid=23:64c67e8d(3716680),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=30,seconds left=0,activeThread=Thread[ExecuteThread: '14' for queue: 'default',5,Thread Group for Queue: 'default'],SCInfo[mydomain+myserver]=(state=active),properties=({weblogic.transaction.name=[EJB com.sanjiv.ejb.prototype.TableSequencesBeanCMP.getNextKeyAfterIncrementingBy(int)]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+135.108.1 97.166:7001+mydomain+, Resources={})]).
at weblogic.ejb20.locks.ExclusiveLockManager$LockBucket.lock(ExclusiveLockManager.java:527)
at weblogic.ejb20.locks.ExclusiveLockManager.lock(ExclusiveLockManager.java:258)
at weblogic.ejb20.manager.ExclusiveEntityManager.acquireLock(ExclusiveEntityManager.java:164)
at weblogic.ejb20.manager.ExclusiveEntityManager.getReadyBean(ExclusiveEntityManager.java:219)
at weblogic.ejb20.manager.ExclusiveEntityManager.preInvoke(ExclusiveEntityManager.java:198)
at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:117)
at weblogic.ejb20.internal.EntityEJBObject.preInvoke(EntityEJBObject.java:88)
at com.sanjiv.ejb.prototype.TableSequencesBeanCMP_by1d8c_EOImpl.getNextKeyAfterIncrementingBy(TableSequencesBeanCMP_by1d8c_EOImpl.java:25)
at com.sanjiv.ejb.prototype.SequenceSessionBean.getNextNumberInSequence(SequenceSessionBean.java:44)
at com.sanjiv.ejb.prototype.SequenceSessionBean_5gvhxn_EOImpl.getNextNumberInSequence(SequenceSessionBean_5gvhxn_EOImpl.java:37)
at com.sanjiv.ejb.prototype.SessionEJBTest.insertDTO(SessionEJBTest.java:65)
at com.sanjiv.ejb.prototype.SessionEJBTest_vend8n_EOImpl.insertDTO(SessionEJBTest_vend8n_EOImpl.java:37)
at com.sanjiv.ejb.prototype.SessionEJBTest_vend8n_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Any suggestions, what could be going wrong?
Any response is greatly appreciated.
Thanks
Sanjiv

 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
actually to prevent concurrency using weblogic you don�t have to use REQUIRES_NEW, to do that:
the �wrapper� EJB may explicitly obtain a transaction context before invoking other
EJBs, or WebLogic Server may automatically create a new transaction context if the
EJB�s trans-attribute element is set to Required or RequiresNew. All EJBs
invoked by the wrapper EJB must be able to support the transaction context (their
trans-attribute elements must be set to Required, Supports, or Mandatory).
take a look at:
http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1092031
regards.

Originally posted by Sanjiv Pansari:

I have an entity bean for which I have defined the Transaction attribute as (REQUIRES_NEW) in the deployment descriptor for all the method this is needed to prevent concurrency issues. But when I call any method on this Entity bean I get the following exception :


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic