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

alesj do-not-reply at jboss.com
Mon Aug 14 09:36:22 EDT 2006


"adrian at jboss.org" wrote : That is because you have done it wrong.
  | 
  | This MC is state machine a metadata model. 
  | 
  | What you should be doing is changing the way the AbstractDependencyValueMetaData
  | works to include demand like processing when the "bean=" is missing.
  | 
  | i.e. You create a new DependencyItem type like the demand dependency
  | (see org.jboss.beans.metadata.plugins.AbstractDemandMetaData$DemandDependencyItem)
  | 
  | In particular the method "public boolean resolve(Controller controller)"
  | 

I must probably put in a 'demand' of my property's class ... and for each context instantiation I supply all implementings classes?

But what if there actually are more then one such matching bean - I would probably get the one that is first instantiated injected, discarting the fact that more matching bean can occur.

What about @Inject meta data?
Where to do the inspection and add dependency items?

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

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



More information about the jboss-dev-forums mailing list