[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Bean instantiate order with contextual injection

adrian@jboss.org do-not-reply at jboss.com
Tue Aug 15 09:07:17 EDT 2006


"alesj" wrote : 
  | Ok, forget then about 'placeholder' approach?
  | 

Yes. It was only a temporary solution so you wouldn't have
to mess around with the visitor.

anonymous wrote : 
  | Calling revisit from where - ConfiguredAction - though AbstractKernelCOntrollerContext?
  | 

>From the DescribeAction.


  |       BeanMetaData metaData = context.getBeanMetaData();
  |       if (metaData.getBean() != null)
  |       {
  |          BeanInfo info = configurator.getBeanInfo(metaData);
  |          context.setBeanInfo(info);
  | 
  |          <snipped/>
  | 
  |          describeMetaData(); // similar to preprocessMetaData();
  |       }
  | 

The first visit is to read the metadata that can be determined
without the classloader/class (which up until now has been
all of it except the AOP stuff).

The second visit is once the class is resolved and the BeanInfo
is available.


  | public interface MetaDataVisitor[Node]
  | {
  |    void initialVisit(...); // the original visit(...)
  |    void describeVisit(...);
  | }
  | 

You can then do all your processing in the describe visit
knowing that context.getBeanInfo() will be available.

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

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



More information about the jboss-dev-forums mailing list