Weblogic: LockTimedOutException
dhaliwal Jul 14, 2008 6:28 PMHello,
I am working with Seam, Weblogic 10MP1 and Trinidad JSF. I have a Stateful search action bean with a @Synchronized(timeout=1000000000) setting, which throws a weblogic.ejb20.locks.LockTimedOutException when a method on it is called when a button on a page is hit 3 or more times in quick succession. The button calls the find method which returns data from the database.
search.xhtml:
tr:commandButton text="Search" action="#{mySearch.find}" id="find" blocking="true"/>
web.xml:
<ejb-local-ref>
<ejb-ref-name>ipbWeb/MySearchAction/local</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>com.myltd.action.MySearch</local>
<ejb-link>MySearchAction</ejb-link>
</ejb-local-ref>
weblogic-ejb-jar.xml:
<weblogic-enterprise-bean>
<ejb-name>mySearch</ejb-name>
<local-jndi-name>primeBrokerWeb/MySearchAction/local</local-jndi-name>
<stateful-session-descriptor>
<allow-concurrent-calls>true</allow-concurrent-calls>
</stateful-session-descriptor>
</weblogic-enterprise-bean>
The following exception is thrown:
Caused by javax.servlet.ServletException with message: "/searchEvents.xhtml @110,25 binding="#{mySearch.table}": javax.ejb.EJBTransactionRolledbackException: [EJB:011042]Stateful Session EJBs cannot be used concurrently. If a stateful session EJB instance is in the middle of a method call and another call is attempted on this instance, a java.rmi.RemoteException is thrown. You may also consider setting the <allow-concurrent-calls> option in your weblogic-ejb-jar.xml. When this tag is set, the concurrent call waits for the first method call to complete.; nested exception is: weblogic.ejb20.locks.LockTimedOutException: [EJB:010107]The lock request from EJB:MySearchAction with primary key:50800237521928192 timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Xid=BEA1-001A7EB869C1C40C9E06(26274925),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=299,activeThread=Thread[[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[seam_domain+AdminServer]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+169.183.166.196:7001+seam_domain+t3+, XAResources={WLStore_seam_domain__WLS_AdminServer, PrimeBrokerDb_DS, GPB_CS_DS},NonXAResources={})],CoordinatorURL=AdminServer+169.183.166.196:7001+seam_domain+t3+)."
Please advise how I can make the Stateful MySarchAction bean receive concurrent requests.
Thanks,
Balvindar
I am working with Seam, Weblogic 10MP1 and Trinidad JSF. I have a Stateful search action bean with a @Synchronized(timeout=1000000000) setting, which throws a weblogic.ejb20.locks.LockTimedOutException when a method on it is called when a button on a page is hit 3 or more times in quick succession. The button calls the find method which returns data from the database.
search.xhtml:
tr:commandButton text="Search" action="#{mySearch.find}" id="find" blocking="true"/>
web.xml:
<ejb-local-ref>
<ejb-ref-name>ipbWeb/MySearchAction/local</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>com.myltd.action.MySearch</local>
<ejb-link>MySearchAction</ejb-link>
</ejb-local-ref>
weblogic-ejb-jar.xml:
<weblogic-enterprise-bean>
<ejb-name>mySearch</ejb-name>
<local-jndi-name>primeBrokerWeb/MySearchAction/local</local-jndi-name>
<stateful-session-descriptor>
<allow-concurrent-calls>true</allow-concurrent-calls>
</stateful-session-descriptor>
</weblogic-enterprise-bean>
The following exception is thrown:
Caused by javax.servlet.ServletException with message: "/searchEvents.xhtml @110,25 binding="#{mySearch.table}": javax.ejb.EJBTransactionRolledbackException: [EJB:011042]Stateful Session EJBs cannot be used concurrently. If a stateful session EJB instance is in the middle of a method call and another call is attempted on this instance, a java.rmi.RemoteException is thrown. You may also consider setting the <allow-concurrent-calls> option in your weblogic-ejb-jar.xml. When this tag is set, the concurrent call waits for the first method call to complete.; nested exception is: weblogic.ejb20.locks.LockTimedOutException: [EJB:010107]The lock request from EJB:MySearchAction with primary key:50800237521928192 timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Xid=BEA1-001A7EB869C1C40C9E06(26274925),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=299,activeThread=Thread[[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads],SCInfo[seam_domain+AdminServer]=(state=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+169.183.166.196:7001+seam_domain+t3+, XAResources={WLStore_seam_domain__WLS_AdminServer, PrimeBrokerDb_DS, GPB_CS_DS},NonXAResources={})],CoordinatorURL=AdminServer+169.183.166.196:7001+seam_domain+t3+)."
Please advise how I can make the Stateful MySarchAction bean receive concurrent requests.
Thanks,
Balvindar