[JBoss Seam] - Re: Perf testing long running transactions
by asachde
Short of getting a generator working I opened 5 browser windows for a simple application that uses security (modified CVS code) and forwards to a page from where other pageflows are to be launched. The login process does not have a pageflow. Randomly I get the following exception on the console (usually at least 1 out of 5 windows and at times upto 3 windows and when I retry it logs me in w/o a problem)
17:25:03,712 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet
threw exception
java.lang.IllegalStateException: JbpmContext may only be used inside a transacti
on
at org.jboss.seam.core.ManagedJbpmContext.getJbpmContext(ManagedJbpmCont
ext.java:71)
at sun.reflect.GeneratedMethodAccessor242.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:101)
at org.jboss.seam.Component.callComponentMethod(Component.java:1626)
at org.jboss.seam.Component.unwrap(Component.java:1647)
at org.jboss.seam.Component.getInstance(Component.java:1473)
at org.jboss.seam.Component.getInstance(Component.java:1440)
at org.jboss.seam.Component.getInstance(Component.java:1422)
at org.jboss.seam.core.ManagedJbpmContext.instance(ManagedJbpmContext.ja
va:112)
at org.jboss.seam.core.ProcessInstance.getProcessInstance(ProcessInstanc
e.java:42)
at org.jboss.seam.core.ProcessInstance$$EnhancerByCGLIB$$d0483d8d.CGLIB$
getProcessInstance$0()
at org.jboss.seam.core.ProcessInstance$$EnhancerByCGLIB$$d0483d8d$$FastC
lassByCGLIB$$6ad0764f.invoke()
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)
at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInt
erceptor.java:39)
at org.jboss.seam.core.ProcessInstance$$EnhancerByCGLIB$$d0483d8d.getPro
cessInstance()
at sun.reflect.GeneratedMethodAccessor243.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:101)
at org.jboss.seam.Component.callComponentMethod(Component.java:1626)
at org.jboss.seam.Component.unwrap(Component.java:1647)
at org.jboss.seam.Component.getInstance(Component.java:1473)
at org.jboss.seam.Component.getInstance(Component.java:1440)
at org.jboss.seam.Component.getInstance(Component.java:1422)
at org.jboss.seam.core.ProcessInstance.instance(ProcessInstance.java:58)
at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(Bus
inessProcessContext.java:210)
at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(Bus
inessProcessContext.java:197)
at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessCon
text.java:55)
at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.ja
va:153)
at org.jboss.seam.Component.getInstance(Component.java:1432)
at org.jboss.seam.Component.getInstance(Component.java:1417)
at org.jboss.seam.core.RenderParameters.instance(RenderParameters.java:6
8)
at org.jboss.seam.core.Manager.redirect(Manager.java:919)
at org.jboss.seam.core.Manager.interpolateAndRedirect(Manager.java:866)
at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigat
ionHandler.java:27)
at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
nListenerImpl.java:84)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
4)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
68)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(Lifecycl
eImpl.java:343)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter
.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
kerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977703#3977703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977703
19 years, 7 months
[JBoss Seam] - one method ending conversation or not
by codelion
Let's say I have an action method
@End
| public String submit() {
| }
and let's say there is logic in it by which normally I am done with the conversation, but in one case I want to stay in the conversation (e.g. go back to a page to fix up information) and traditional validation can't catch it (e.g. because it needs info from more than one object).
Assume there is important info from the user in a conversation scoped bean. The @End would throw it out, wouldn't it?
There isn't a way to do this right other than having two separate methonds, one with @End, and the other without.
public String submit() {
| // still a chance to decide to stay in the conversation
| ...
| if (good) {
| return done();
| }
| ...
| }
|
| @End
| public String done() {
| }
That's fine, just making sure I got it right. Call the one with @End only once sure we won't want to stay in the conversation.
Clearly this is easier if using pageflows, and I think we will.
Then a question could be whether one method calling the other method in the same bean will cause all the injection to happen over again, or whether it is smart enough to know it is "in the object" already. Or should I just ignore that for now, assume it isn't worth worrying about.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977691#3977691
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977691
19 years, 7 months