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)
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...
Thanks for your suggestions. But can you also help me how to make the session
bean thread safe?
Thanks in Advance
Srinath