3 Replies Latest reply on Feb 25, 2005 10:51 AM by Adrian Brock

    Boston meeting notes: Two phase join point factory construct

    Adrian Brock Master

      We need to satisfy the needs of
      * dynamic classloading (hot deployment of classes),
      * "hot" dependency injection (hot deployment of dependent beans)
      * AOP bytecode engineering
      * dynamic pointcut resultion (including from jboss-aop xml or MicroContainer configuration)
      * annotation overrides (including from jboss-aop.xml or MicroContainer configuration)

      The solution is two phase join point factory resolution.

      The MicroContainer already has this notion in the lifecycle.

      NOT_INSTALLED - The bean has been registered but the class is not available, some dependencies are known but others may come from the class annotations
      DESCRIBED - The bean's class is available and a description has been retrieved, including dependency information
      INSTANTIATED - All the class/constructor dependencies were satisified and the bean has been created

      But the implementation needs to change to use the ClassAdaptor

      The Class is available but we don't load it yet because AOP or annotations may
      introduce extra dependencies we don't know about yet.
      Instead we:
      1) Use the ClassAdaptor to obtain the ClassData (which maybe overridden by aop config)
      2) Use the ClassAdaptor to tell it about annotation overrides at the BeanMetaData level (i.e. the microcontainer instance configuration)
      3) Use the ClassAdaptor to obtain dependencies needed by annotations
      4) Use the ClassAdaptor to obtain dependencies needed by linked AspectFactories/Advices

      Once all the dependencies have been satisfied the MicroContainer asks for
      the JoinPointFactory which will load the class (if not already done so) and link
      the relevent class advisor.
      This will give the MicroContainer a ConstructorJoinPoint that can be used
      to create the instance (including any InstanceAdvisor if required)