From: <bil...@jb...> - 2005-04-28 01:12:34
|
anonymous wrote : | The reason for knowing about the SecurityDomain is a fundamental difference | in the deployment strategies of AOP vs MC | | In AOP if the advice is not deployed it is not included in the stack. | If a depdendency of the advice is not deployed you find out after requests are | being processed with a runtime exception. | I don't think you understand how I am doing this AOP/MC integration. When the AOP deployer sees an Aspect declaration, it will create a GenericBeanFactory and install it into the Microconatiner. It will also register AOP specific metadata about the Aspect into the AspectManager. When a binding is defined, the AOP Deployer creates an InterceptorFactory and registers the metadata for binding the advice/aspect to the class. This InterceptorFactory has a reference to the Kernel. When a Class is statically initialized, it tries to create advice chains. This is when the InterceptorFactory tries to lookup the GenericBeanFactory. anonymous wrote : | In the MC if the advice and its dependencies are not installed the object is not created | and the user is told to deploy the missing dependency. | And this works, so what is the problem? ClassAdapter.getDependencies() is currently called before class static initialization and the aspect dependencies propagated. Did you see that I implemented and tested this? The SecurityDomain example is a different example. This is because knowledge of the dependency is hidden in the annotations. So, I thought our agreement was that this annotation would have a @Dependency annotation on it: | @Dependency(attribute="value") | public @Interface SecurityDomain { | String value(); | } | Either the MC or AOP is gonna have to look at every single annotation attached to the class (and superclass) for this @Dependency annotation and add it to the BeanMetaData dependency list. Correct? I'm fine with adding this to the AspectAdapter. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875695#3875695 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875695 |