[Design of AOP on JBoss (Aspects/JBoss)] - Re: Per Instance Aspects Overhead
by flavia.rainone@jboss.com
I was wrong regarding the JoinPointGenerator unshared instances. As a matter of fact, they are shared between the intance advisors and the class advisor.
What was happening was a a bug inserted during implementation of JBAOP-550:
http://jira.jboss.com/jira/browse/JBAOP-562
I'm about to commit the fix for JBAOP-562. However, the jboss messaging tests still fail. What I am seeing here is 3418ms spent on 513 invocations to JoinPointGenerator.generateJoinPointClass. Taking a deeper look, a 2898ms parcel of this time is spent on the generation of 29 joinpoint classes. The rest is spent on retrieving generated classes from the cache and calls to reload the generated class from the class loader.
The time spent in the generation of joinpoint classes could be hardly be optimized, IMO. 1153ms are spent alone in 29 calls to JoinPointGenerator.initialiseAdviceInfosAndAddFields, 741ms of which are spent in the JoinPointGenerator.addAspectFieldAndGetter() method. The main overhead of this method is in the call to CtNewMethod.make() method, of javassist (691ms). The 1153ms also include 199 ms spent on 66 calls to the AdviceMethodFactory.findAdviceMethod. I am not sure we can optimize something inside it either (need to take a deeper look). Finally, there are 150 ms spent alone on the constructor of AdviceSetup. Most of the overhead of this constructor lies in calls to ClassLoader.loadClass and to ReflectToJavassist.classToJavassist. The rest of these 1153ms are micro seconds spent here and there with other operations.
Second in the overhead list of joinpoint classes generation are the 919ms spent on 29 invocations to JoinPointGenerator.createConstructors. Most of this overhead is caused by the calls to CtNewConstructor.make javassist methods.
I wonder whether it is worth to optimize the joinpoint class generation, or if it would be better to concentrate on turning the 513 invocations to JoinPointGenerator.generateJoinPointClass into aprox 29 calls.
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145838#4145838
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145838
17 years, 11 months
[Design of EJB 3.0] - Something rotten in ejb3 deployers?
by adrian@jboss.org
I think this probably relates to whatever problem has caused the
classloader leak in the ejb3 deployers last week:
http://hudson.jboss.org/hudson/job/JBoss-AS-5.0.x-TestSuite-sun15/533/tes...
When I run the ee5appclient tests (which fail), sometimes it throws an exception at
shutdown:
[url]
15:27:14,432 WARN [AspectDeployer] Error undeploying xml ejb3-interceptors-aop.xml from org.jboss.aop.AspectManager@130e37
java.lang.RuntimeException: java.lang.IllegalStateException: BaseClassLoader@1a6b660{vfsfile:/home/ejort/jboss-head/testsuite/output/lib/ee5client-test.ear} classLoader is not connected to a domain (probably undeployed?) for class org.jboss.ejb3.annotation.SecurityDomain
at org.jboss.aop.pointcut.Util.matchesClassExpr(Util.java:137)
at org.jboss.aop.pointcut.MethodMatcher.matchesClass(MethodMatcher.java:264)
at org.jboss.aop.pointcut.MethodMatcher.matches(MethodMatcher.java:106)
at org.jboss.aop.pointcut.MethodMatcher.visit(MethodMatcher.java:100)
at org.jboss.aop.pointcut.ast.ASTMethod.jjtAccept(ASTMethod.java:44)
at org.jboss.aop.pointcut.ExecutionMethodMatcher.visit(ExecutionMethodMatcher.java:58)
at org.jboss.aop.pointcut.ast.ASTExecution.jjtAccept(ASTExecution.java:37)
at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:89)
at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:83)
at org.jboss.aop.pointcut.PointcutExpression.matchesExecution(PointcutExpression.java:119)
at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:893)
at org.jboss.aop.ClassAdvisor.updateInterceptorChains(ClassAdvisor.java:642)
at org.jboss.aop.ClassAdvisor.doRebuildInterceptors(ClassAdvisor.java:897)
at org.jboss.aop.ClassAdvisor$RebuildInterceptorsAction$2.rebuildInterceptors(ClassAdvisor.java:2012)
at org.jboss.aop.ClassAdvisor.rebuildInterceptors(ClassAdvisor.java:877)
at org.jboss.aop.ClassAdvisor.removeAdviceBindings(ClassAdvisor.java:426)
at org.jboss.aop.AspectManager.removeBindings(AspectManager.java:1404)
at org.jboss.aop.Domain.removeBindings(Domain.java:198)
at org.jboss.aop.AspectXmlLoader.bulkUndeploy(AspectXmlLoader.java:1216)
at org.jboss.aop.AspectXmlLoader.undeployDomain(AspectXmlLoader.java:1087)
at org.jboss.aop.AspectXmlLoader.undeployTopElements(AspectXmlLoader.java:1301)
at org.jboss.aop.AspectXmlLoader.undeployXML(AspectXmlLoader.java:1205)
at org.jboss.aop.deployers.AspectDeployer.undeployXml(AspectDeployer.java:205)
at org.jboss.aop.deployers.AspectDeployer.undeployXml(AspectDeployer.java:189)
at org.jboss.aop.deployers.AspectDeployer.undeploy(AspectDeployer.java:134)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalUndeploy(AbstractVFSRealDeployer.java:54)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:197)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1189)
at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1144)
at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1408)
at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1066)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:679)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:456)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:510)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:373)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:334)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:162)
at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
Caused by: java.lang.IllegalStateException: BaseClassLoader@1a6b660{vfsfile:/home/ejort/jboss-head/testsuite/output/lib/ee5client-test.ear} classLoader is not connected to a domain (probably undeployed?) for class org.jboss.ejb3.annotation.SecurityDomain
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:723)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:372)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.loadClass(AnnotationRepositoryToMetaData.java:209)
at org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.hasClassAnnotation(AnnotationRepositoryToMetaData.java:328)
at org.jboss.aop.Advisor.hasAnnotation(Advisor.java:404)
at org.jboss.aop.Advisor.hasAnnotation(Advisor.java:379)
at org.jboss.aop.pointcut.Util.matchesClassExpr(Util.java:115)
... 41 more
[/url]
So something is not getting cleaned up in AOP/EJB3 land.
The first link shows it is not related to deployment failover.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145832#4145832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145832
17 years, 11 months