[jboss-dev-forums] [Design of POJO Server] - Re: Integrating aop-mc-int bean metadata with AS5

kabir.khan@jboss.com do-not-reply at jboss.com
Wed Aug 6 10:22:25 EDT 2008


I'll try to explain exactly what I am doing first. I need to do a few things in my POST_CLASSLOADER deployer org.jboss.aop.asintegration.jboss5.AbstractAopMetaDataDeployer, which handles the beans from the -aop.xml (or AOP annotations):

1) I set the correct name of the AspectManager bean to use for the beans installing aop artifacts, this is the one from conf/aop.xml if a "global" deployment. In the case of a scoped deployment, I register a new aop Domain, register that as a bean in the MC, and use it's name.

2) I also need to make sure that the pointcut expressions are deployed before any of the classes are loaded. I am currently deploying all the beanmetadata from -aop.xml myself at this stage, and stripping them out of the deployment so that they are not deployed again by BeanMetaDataDeployer. This might be overkill, maybe I should just install the pointcuts directly and allow the later deployers to install my beans as normal? I am using similar code to BeanMetaDataDeployer to deploy the beans from my deployer.

3) If it is a scoped deployment, I modify the names of the installed beans before deploying them, and add an alias using the original name, so that the aliases/original names of the aspects can still be used when injected into the bindings. I then add an annotation so that the PreInstallaction deploys the beans into a scoped controller for that deployment.

As far as I can remember from my chat with Ales, although you can have beans with the same name in sibling scopes, we also have the scenario where a scoped deployment deploys an aspect with the same name in both the "global" scope and in the "scoped" scope. The aliases/unique names are used so that AbstractController.uninstall() knows which exact bean to uninstall on undeployment.

Maybe the stuff you mention about the integration between the MDR and the scoped controllers is the underlying problem?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169058#4169058

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169058



More information about the jboss-dev-forums mailing list