[JBossCache] - JBC 2 performance
by aditsu
I wrote some code that used JBC 1.4.1.SP3, then later I converted it to use JBC 2.0.0.CR2, and I noticed that at least a part of it is running MUCH slower. Like, an order of magnitude slower.
That part of the code is putting a lot of data in the cache. I ran it with a profiler and a debugger, and found that most time is spent in the SimpleEntry constructor (which is getting called over 16 million times in my snapshot).
A frequent call sequence is:
CacheLoaderInterceptor.createNodes -> findChild -> UnversionedNode.getChildrenMapDirect -> MapCopy -> SimpleEntry. There are a few nodes that have MANY children, and JBC seems to call getChildrenMapDirect() on them repeatedly, and it creates a new MapCopy every time, with a new SimpleEntry for every child.
I looked at the JBC 1.4.1 code, and there CacheLoaderInterceptor.createNodes calls AbstractNode.getChild which calls "get" directly from the children map, without creating thousands of extra objects.
I don't know the reason why UnversionedNode.getChildrenMapDirect now has to make a new MapCopy every time, but I can tell you it seriously affects performance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059060#4059060
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059060
18Â years, 9Â months
[JBoss jBPM] - Exception on Timer-Execution under Weblogic
by syngolis
I am evaluating the compatibility of jBPM to work in other application server environments. Actual i am on testing in weblogic (8.0, 9.0, 9.2).
It works in all versions perfectly, except the timer functionality.
In 8.0 no TimedObject.class exists, so it has to be done i an other way )-:
In 9.0 and 9.2 The timers are created in db, but at the execution date (duedate) an exception is thrown:
####<29.06.2007 9.59 Uhr CEST> <Error> <EJB> <winpc70> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1183103982265> <BEA-011088> <The following error occurred while invoking the ejbTimeout(javax.ejb.Timer) method of EJB 'TimerServiceBean(Application: ISOWorkflow, EJBComponent: jbpm-enterprise.jar)'.
| javax.ejb.EJBException: EJB Exception: : org.jbpm.JbpmException: couldn't execute timer
| at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:105)
| at weblogic.ejb.container.timer.TimerImpl.timerExpired(TimerImpl.java:298)
| at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
| at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
| at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
| at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
| Caused by: javax.ejb.EJBException: EJB Exception: : org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@dd5a9d
| at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
| at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:61)
| at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:95)
| at weblogic.ejb.container.timer.TimerImpl.timerExpired(TimerImpl.java:298)
| at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
| at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
| at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
| at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
| Caused by: org.jbpm.graph.def.DelegationException: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:376)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
| at org.jbpm.graph.def.ProcessDefinition$$EnhancerByCGLIB$$fa7aa0e4.raiseException(<generated>)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:367)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:270)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
| at org.jbpm.graph.def.Node.leave(Node.java:381)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
| at org.jbpm.graph.node.State$$EnhancerByCGLIB$$e0d3d84e.leave(<generated>)
| at org.jbpm.graph.exe.Token.signal(Token.java:194)
| at org.jbpm.graph.exe.Token.signal(Token.java:157)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
| at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$44509b08.signal(<generated>)
| at org.jbpm.job.Timer.execute(Timer.java:93)
| at org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand.execute(ExecuteTimerCommand.java:23)
| at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
| ... 7 more
| Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
| at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
| at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
| at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
| at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
| at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
| at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:153)
| at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.deleteTimersByName(EjbSchedulerService.java:49)
| at org.jbpm.scheduler.def.CancelTimerAction.execute(CancelTimerAction.java:46)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
| ... 28 more
| Caused by: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
| at weblogic.ejb.container.timer.TimerImpl.cancel(TimerImpl.java:618)
| at org.jbpm.scheduler.ejbtimer.TimerServiceBean.cancelTimersByName(TimerServiceBean.java:53)
| at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:138)
| ... 31 more
| ; nested exception is: org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@dd5a9d
| at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
| at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:657)
| at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
| at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
| at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
| at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:76)
| at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:95)
| ... 5 more
| ; nested exception is: org.jbpm.JbpmException: couldn't execute timer
| at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
| at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:643)
| at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
| at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
| at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:570)
| at weblogic.ejb.container.internal.TimerDrivenLocalObject.postInvoke(TimerDrivenLocalObject.java:76)
| at weblogic.ejb.container.timer.TimerImpl.timerExpired(TimerImpl.java:395)
| at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
| at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
| at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
| at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
| >
I use the cvs version (3.2.1) of the jbpm-engine.
Anyone an idea about this issue??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059057#4059057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059057
18Â years, 9Â months
[JBoss jBPM] - No JbpmConfiguration class def found in jBPM-jpdl 3.2.1
by masipu
I'm trying to test 3.2.1 version and deployed a war file (that i have used for testing with 3.1.3 jbpm-starter-kit) that included simple servlet that created a new process instance. Servlet throws following error:
10:28:54,020 ERROR [[XmlReceiver]] Servlet.service() for servlet XmlReceiver threw exception
java.lang.NoClassDefFoundError: org/jbpm/JbpmConfiguration
at com.sample.action.XmlReceiver.doGet(XmlReceiver.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at .....
I tried to deploy the same servlet to jbpm-starter-kit as it is out-ot-the-box and it worked well. So what should I do to make it work in 3.2.1? I'm afraid I have missed something but the readme.html do say that "This is a preconfigured jboss 4.0.2 installation that contains jBPM." which is about the same as is says at starter kit also.. So in my opinion it should work "out-of-the-box".
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059050#4059050
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059050
18Â years, 9Â months