Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lock Timed out exception in stateful Session Bean

0 views
Skip to first unread message

srinath

unread,
Apr 12, 2002, 3:42:40 AM4/12/02
to

Hi All,

We have a stateful session bean and put the reference of the bean in HttpSession
and retrieve it from other JSP.

While calling a method from bean, we are often getting the following exception.

Any help please?

weblogic.ejb.extensions.LockTimedOutException: Lock for primaryKey:1018581328443_46
could not be acquired without waiting.
at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:134)
at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:447)
at weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObject.java:159)
at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:487)
at com.elink.jbe.savejobses.SaveJobSesBeanEOImpl.getJobHeaderData(SaveJobSesBeanEOImpl.java:1258)
at jsp_servlet._jobentry._jbeenquirydefaults._jspService(_jbeenquirydefaults.java:243)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:761)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:708)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:346)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)

Arjuna Chala

unread,
Apr 12, 2002, 9:45:22 AM4/12/02
to
Looks like you have two threads accessing the bean at the same time. You
need to make it thread safe. Also, store the handle of the session bean
instead of the session bean itself in the session.

By the way, session beans (handle or otherwise) are not meant to be stored
in the HttpSession, and here is why:

http://groups.google.com/groups?q=stateful+session+bean+httpsession&hl=en&se
lm=3b72acb9%40newsgroups.bea.com&rnum=6

"srinath" <srinath...@megasoft.com> wrote in message
news:3cb681e0$1...@newsgroups.bea.com...

srinath

unread,
Apr 15, 2002, 1:19:06 AM4/15/02
to

Hi Arjuna,

Thanks for your suggestions. But can you also help me how to make the session
bean thread safe?

Thanks in Advance
Srinath

0 new messages