In response to
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983302#..., I am
looking at integrating the aop-mc integration code with JBoss 5. I have more or less got
this working on my machine. A few things:
1) In order for the AOPConstructorJoinpointFactory to be used, I have had to add
jboss-aop-mc-int.jar to the root jboss/lib directory since the check done by the
PropertyConfiguration is done when first started. Unless I move
server/xxx/lib/javassist.jar
server/xxx/deployers/jboss-aop-jboss5.deployer/jboss-aop-jdk50.jar
server/xxx/deployers/jboss-aop-jboss5.deployer/trove.jar
into jboss/lib as well I get NoClassDefFoundErrors when accessing the jboss-aop-mc-int.jar
classes - probably because the classloader used for loading up the jboss/lib classes
cannot see the classes loaded up from the server/xxx/lib and server/xxx/deployers
directory.
2) It slows the startup time of the default configuration from about 37s to 45s on my
machine. The AspectManagerService currently has an "exclude" property to set all
classes starting with "org.jboss." to not be transformed/inspected, which works
on the underlying AspectManager singleton. However the AspectManagerService is installed
as part of the AspectDeployer, which is one of the last deployers to be deployed, meaning
that inspection is done of all beans before it has been installed since the
AspectManagerService has not yet been installed. This is also controllable via system
properties, so the run.sh/.bat files could be modified to use that, so that this is picked
up before the AspectManagerService has been installed. I think I would prefer some way for
inspection of classes to be "turned off", until the AspectManagerService has
been installed. Is there a way to swap out the ConstructorJoinPointFactory returned by the
AOPJoinpointFactoryBuilder at runtime, so that it returns the BasicJoinpointFactory until
the AspectManagerService is installed, and the AOPJoinpointFactory after the
AspectManagerService has been installed? I can think of at least one hacky way to do this
:-)
I guess the question is, do we want the mc, and deployers installed before the
AspectDeployer, to have this integration with the aspect layer or not? Do we care about
the performance at this stage?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983882#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...