[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Dependency on non-existant bean when trying to create

alesj do-not-reply at jboss.com
Tue Nov 3 15:49:16 EST 2009


Yes, this is somehow expected.

PropertyMD --> ValueMD --> BeanMD --> inner bean --> dependency

AbstractValueMD::getChildren doesn't distinguish between plain properly value and metadata value.

Normally MC metadata should be hidden for POJOs,
so I wouldn't put too much effort into this --> would go with a wrapper.

Perhaps you can add this to BMDBuilder:

  | <T> T wrap(T impl, Class<T> clazz)
  | {
  |    return new MetaDataWrapper<T>(impl, clazz);
  | }
  | 
  | public class MetaDataWrapper<T>
  | {
  |    T impl;
  |    Class<T> clazz;
  | 
  |    public MetaDataWrapper(T impl, Class<T> clazz) { ... }
  | 
  |    public T unwrap() { return impl; }
  | }
  | 
which hides the actual metadata in generic way.


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

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



More information about the jboss-dev-forums mailing list