"[EMAIL PROTECTED]" wrote : anonymous wrote : 
  |   | So, IoC container will inject dependecies into the aspect via the 
GenericBeanFactory.  The AOP ClassAdvisor needs to be able to lookup these 
GenericBeanFactories so it can decide when the Aspect is created.
  |   | 
  | These are injected into the 
AspectMetaData/AspectFactory/GenericBeanFactory, 
  | not the aspect. 
  | Currently this is not possible because jboss-aop.xml reads the xml and does 
the construction directly from it.
  | 

This does not happen at deployment.  The XML fragment in the aspect declaration 
in jboss-aop.xml is stored for later use when then aspect is actually 
created/instantiated.  It is just a matter of writing a new AspectFactory 
implementation and plugging it in.

anonymous wrote : 
  | anonymous wrote : 
  |   | Also, aspect factories sometimes have no idea how to resolve 
dependencies until they are bound to the class they are weaving into.  i.e 
SecurityDomain.  Don't you remember going through this exercise?
  |   | 
  | 
  | Yes that is the @Dependency annotation:
  | 
  |   | @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME)
  |   | @Dependency(name="value") // HERE value() represents something to 
depend upon
  |   | public @interface SecurityDomain
  |   | {
  |   |    String value();
  |   | }
  |   | 

This @Dependency annotation only tells the MC about the dependency.  The MC 
doesn't know how/where this dependency should be injected.  The @SecurityDomain 
is on the bean class and it is the aspect that needs this information to lookup 
and set the dependency within the aspect.  A distinct, non-GenericBeanFactory 
implementation of an AspectFactory would be needed here.  It would work the 
same way the Security aspect works now in the current impl except that they MC 
would be able to hold up bean creation because the SecurityDomain dependency 
would be published to it via the @Dependency annotation.


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

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


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to