Re: [jboss-dev-forums] [JBoss XML Binding Development] - first stax performance test
by Alexey Loubyansky
Alexey Loubyansky [http://community.jboss.org/people/alex.loubyansky%40jboss.com] replied to the discussion
"first stax performance test"
To view the discussion, visit: http://community.jboss.org/message/542122#542122
--------------------------------------------------------------
I've tested the latest woodstox 4.0.8. And also have found a simply stupid bug in my previous test: XMLInputFactory was an instance variable instead of being a class variable. Sorry, that makes the previous tests not fare wrt StAX.
I've re-run the tests only for XB just switching the parsers: SAX, JDK StAX, Woodstox.
For all the parsers validation was disabled, namespace awerness enabled, XInclude disabled.
XB features: property replacement disabled, default reflection-based handlers.
|| *
* || *JDK6 SAX* || JDK6 StAX
|| *Woodstox* ||
| first run (in ms) | 119.9 | 21.8 | 79.5 |
| next 1000 runs (in ms) | 939.2 | 546 | 463.3 |
Woodstox takes longer to initialize but the total time (first plus subsequent 1000 runs) is still slightly better than the JDK's StAX (542.8 vs 567.8).
WRT the XB testsuite, Woodstox showed the same failures as the JDK6 StAX, i.e. no support for default attribute values (same reason, i.e. schema validation is not supported) and XInclude.
Woodstox does support validation but only for DTD, which is not that interesting now.
It does make sense to look into switching to a StAX impl, which means the limitations above will have to be addressed. Default attribute values could be specified with Java binding annotations or initialized manually. But XInclude still has to be implemented. I'm gonna look into that.
Another thing, entity resolution (which is in JBossEntityResolver) will have to be adapted as well. StAX API, of course, doesn't use SAX's EntityResolver and InputSource.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542122#542122]
Start a new discussion in JBoss XML Binding Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
Re: [jboss-dev-forums] [JBoss Microcontainer Development] - ClassPool bootstrap refactoring
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion
"ClassPool bootstrap refactoring"
To view the discussion, visit: http://community.jboss.org/message/542120#542120
--------------------------------------------------------------
I ran the tests. In AS 4 it is fine apart from
>
> $more output/reports/TEST-org.jboss.test.aop.test.ScopedAttachUnitTestCase.txt
>
> Testsuite: org.jboss.test.aop.test.ScopedAttachUnitTestCase
>
> Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 2.041 sec
>
>
>
> Testcase: testPOJOAdvised1 took 0.276 sec
>
> Testcase: testPOJOAdvised2 took 0.115 sec
>
> Testcase: testExpectedValues1 took 0.088 sec
>
> Testcase: testExpectedValues2 took 0.073 sec
>
> Testcase: testScoped1 took 0.324 sec
>
> Testcase: testScoped2 took 0.275 sec
>
> Caused an ERROR
>
> null
>
> javax.management.RuntimeMBeanException
>
> at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
>
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
>
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>
> at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
>
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
>
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
>
> at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
>
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
>
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>
> at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
>
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
>
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
>
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
>
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
>
> at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
>
> at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
>
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
>
> at sun.rmi.transport.Transport$1.run(Transport.java:159)
>
> at java.security.AccessController.doPrivileged(Native Method)
>
> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>
> at java.lang.Thread.run(Thread.java:637)
>
> Caused by: java.lang.RuntimeException: Error generating joinpoint class for joinpoint Constructor[constructor=public org.jboss.test.aop.scopedattach.POJO()]
>
> at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:310)
>
> at org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
>
> at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1730)
>
> at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
>
> at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1059)
>
> at org.jboss.test.aop.scopedattach.POJO$POJOAdvisor.POJOAdvisor_new_$aop(POJO$POJOAdvisor.java)
>
> at org.jboss.test.aop.scopedattach.POJO.POJO_new_$aop(POJO.java)
>
> at org.jboss.test.aop.scopedattach.ScopedTester.testScoped(ScopedTester.java:113)
>
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>
> ... 44 more
>
> Caused by: javassist.CannotCompileException: Error compiling. Code
>
> {super($);isForInstanceAdvisor=($1.getAdvisor() instanceof org.jboss.aop.InstanceAdvisor);around2 = getAround2();around3 = getAround3();around4 = getAround4();around5 = getAround5();around6 = getAround6();}
>
> at org.jboss.aop.instrument.JoinPointGenerator.createPublicConstructor(JoinPointGenerator.java:1120)
>
> at org.jboss.aop.instrument.JoinPointGenerator.createConstructors(JoinPointGenerator.java:1019)
>
> at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:370)
>
> at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
>
> ... 56 more
>
> Caused by: javassist.CannotCompileException: [source error] no such a constructor
>
> at javassist.CtBehavior.setBody(CtBehavior.java:409)
>
> at javassist.CtBehavior.setBody(CtBehavior.java:375)
>
> at javassist.CtConstructor.setBody(CtConstructor.java:216)
>
> at javassist.CtNewConstructor.make(CtNewConstructor.java:102)
>
> at org.jboss.aop.instrument.JoinPointGenerator.createPublicConstructor(JoinPointGenerator.java:1113)
>
> ... 59 more
>
> Caused by: compile error: no such a constructor
>
> at javassist.compiler.MemberCodeGen.atMethodCallCore2(MemberCodeGen.java:593)
>
> at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:575)
>
> at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:523)
>
> at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)
>
> at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
>
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:337)
>
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
>
> at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
>
> at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
>
> at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291)
>
> at javassist.compiler.Javac.compileBody(Javac.java:222)
>
> at javassist.CtBehavior.setBody(CtBehavior.java:401)
>
> ... 63 more
>
>
>
>
In AS 5 all tests are fine apart from
> $more output/reports/TEST-org.jboss.test.aop.test.RemotingUnitTestCase.txt
> Testsuite: org.jboss.test.aop.test.RemotingUnitTestCase
> Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 6.848 sec
>
> Testcase: testRemoting took 0.227 sec
> Caused an ERROR
> org/jboss/classpool/spi/ClassPoolRepositoryCallback
> java.lang.NoClassDefFoundError: org/jboss/classpool/spi/ClassPoolRepositoryCallback
> at org.jboss.aop.AspectManager.initManager(AspectManager.java:267)
> at org.jboss.aop.AspectManager.instance(AspectManager.java:246)
> at org.jboss.aop.AspectManager.instance(AspectManager.java:235)
> at org.jboss.aop.proxy.ClassProxyFactory.getProxyClass(ClassProxyFactory.java:111)
> at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:152)
> at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:146)
> at org.jboss.aop.proxy.MarshalledClassProxy.readResolve(MarshalledClassProxy.java:58)
> at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
> at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:134)
> at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
> at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
> at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
> at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
> at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
> at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
> at $Proxy0.invoke(Unknown Source)
> at org.jboss.test.aop.test.RemotingUnitTestCase.testRemoting(RemotingUnitTestCase.java:62)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.ClassNotFoundException: org.jboss.classpool.spi.ClassPoolRepositoryCallback
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
>
The same error occurs for the other tests in RemotingUnitTestCase as well. ClassPoolRegistryCallback has been there since Alpha1, so I guess it is a classloader issue. I think remember Flavia mentioning something once, but not exactly what?
I'll try to dig in to the errors tomorrow, although I am not sure how much time I will spend on this since we are only really targeting AS 6 with the current AOP releases, supporting previous AS versions is just us "being nice".
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542120#542120]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
Re: [jboss-dev-forums] [jBPM Development] - JBPM-2537
by Maciej Swiderski
Maciej Swiderski [http://community.jboss.org/people/swiderski.maciej] replied to the discussion
"JBPM-2537"
To view the discussion, visit: http://community.jboss.org/message/541972#541972
--------------------------------------------------------------
Alejandro Guizar wrote:
>
> I reviewed the patch today. It looks OK; however, since timer expiration is mostly a special case of cancel, expiration, cancellation and any other form of premature task termination can be handled through a single cancel(outcome, state) method. I have attached a new patch to https://jira.jboss.org/jira/browse/JBPM-2537 JBPM-2537. Let me know what you all think.
>
> On a different topic, I am not quite happy with the addition of the TimedActivityBehaviour interface and Execution.signal(String, boolean) method just to deliver a timer expiration signal. It should be possible to do it through the existing ExternalActivityBehavior and Execution.signal(String, Map) by passing a special parameter that indicates the cancellation state ("cancelled", "expired" or any other). I'm going to explore this path next week.
Works fine. Like you changes, they simplify it, so that's great.
I would agree if we are talking only about expiration/cancellation of tasks then perhaps we could skip additional interface. But since there could be some custom activities defined I think there will be a need for distinguishing it (I mean cancel and timeout/expired). In some cases it is important to know if activity was executed manually by signalling or automatically on timeout event.
Looking forward to your exploration results.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/541972#541972]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months