| From | Sent On | Attachments |
|---|---|---|
| jdw...@frii.com | Jul 11, 2001 6:08 pm | |
| Craig R. McClanahan | Jul 30, 2001 8:57 pm |
| Subject: | Re: struts tags and thread safety | |
|---|---|---|
| From: | Craig R. McClanahan (crai...@apache.org) | |
| Date: | Jul 30, 2001 8:57:48 pm | |
| List: | org.apache.struts.user | |
On Wed, 11 Jul 2001 jdw...@frii.com wrote:
Hi all, I'm wondering if the struts tags are thread safe?
On a propertly implemented container, all custom tags (not just the Struts ones) are thread safe. The JSP spec requires that a single custom tag instance be used by only one request at a time.
I have a view which has two frames, each with a jsp page using the logic:iterate referencing the same collection. When I request the page which defines the frames and thus loads both jsp pages at the same time I get exceptions thrown( see below). When I request the jsp pages seperately, the pages work properly.
Anyone have thoughts on this?
This sounds more like a problem with EJBs than with custom tags. It is not legal to access the same EJB instance in more than one thread, so you'll have to ensure that this does not happen.
thanks
john ware
Craig McClanahan
- with nested exception:
[weblogic.utils.NestedRuntimeException: Error writing 'Context hashcode:
'1491028', primaryKey: '284', flags: '', needsRefresh: '
alse', needsFlush: 'true', pinned: 'true', ejbObject hashcode:
'1284123', bean hashcode: '2949298'' to persistent store - with ne
ted exception:
[java.sql.SQLException: ORA-08177: can't serialize access for this
transaction
]]
at
weblogic.jts.internal.CoordinatorImpl.throwRollbackException(CoordinatorImpl.java:737)
at
weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorImpl.java:377)
at weblogic.jts.internal.TxContext.commit(TxContext.java:255)
at
weblogic.ejb.internal.StatefulEJBObject.postInvokeOurTx(StatefulEJBObject.java:315)
at
weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:795)
at
com.arraybiopharma.ejb.entity.TimeSliceBeanEOImpl.getRegHours(TimeSliceBeanEOImpl.java:117)
at
com.arraybiopharma.ejb.entity.TimeSliceBeanEOImpl_WLSkel.invoke(TimeSliceBeanEOImpl_WLSkel.java:248)
at
weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java:347)
at
weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java:86)
at
weblogic.rmi.extensions.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:82)
at
weblogic.rmi.internal.ServerRequest.sendOneWay(ServerRequest.java:73)
at
weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:77)
at
com.arraybiopharma.ejb.entity.TimeSliceBeanEOImpl_WLStub.getRegHours(TimeSliceBeanEOImpl_WLStub.java:789)
at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.util.PropertyUtils.getSimpleProperty(PropertyUtils.java:717)
at org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.java:426)
at org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:453)
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:503) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
at
jsp_servlet._timedetailhours._jspService(_timedetailhours.java:254)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
Wed Jul 11 18:54:53 MDT 2001:<E> <WebAppServletContext-ats> Root cause of ServletException javax.servlet.jsp.JspException: Exception thrown by getter for property activities[0].timeSlices[10].regHours of bean timeForm at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:513) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
at
jsp_servlet._timedetailhours._jspService(_timedetailhours.java:254)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)





