"[EMAIL PROTECTED]" wrote : You'll have to show me why it is easier. | | Take the pathological case: | | 1) A bean is requested to be deployed that has the security annotation, BUT the | bean class is not deployed yet so we don't this yet. | | 2) When the bean class is deployed it then knows it needs to add the aspect and | metadata, but the aspect class is not deployed yet. | It does know enough to add the metadata to construct the aspect once the class is | available. |
It is the aspect that knows its dependencies. The aspect's factory doesn't know the security domain it depends on until it queries the bean's metadata. Furthermore, the aspect may need additional metadata from the bean class to determine its dependencies. An even quirkier example is an aspect that is created PER_JOINPOINT and that aspect has a dependency based on metadata contained in the joinpoint, not the class. I just don't see how you can define these types of dependencies in the current XML of the MC. Can you show me how? In fact, I don't think you can do it unless the MC has knowledge that an AOP framework is interacting with it. I don't think there is any other way than allowing the aspect factory to be able to register its dependencies itself. anonymous wrote : | 3) The aspect class is deployed we can look at it and see whether it has other | dependency injections. | Yes, but the aspect class may not be able to specify it's dependencies in static metadata. It may have to have knowledge of its bean class before it can know its dependencies. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861620#3861620 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861620 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development