[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: setting managed property of type List

alesj do-not-reply at jboss.com
Mon Dec 17 20:15:18 EST 2007


Alexey had some more problems:

  | I think I figured it out...
  | 
  | AbstractManagedObjectFactory:
  |    public ManagedObject buildManagedObject(Class<? extends Serializable> clazz)
  | {
  |                if (managed)
  |                {
  |                   TypeInfo typeInfo = propertyInfo.getType();
  |                   if( typeInfo.isArray() || typeInfo.isCollection() )
  |                      metaType = new ArrayMetaType(1, MANAGED_OBJECT_META_TYPE);
  |                   else
  |                      metaType = MANAGED_OBJECT_META_TYPE;
  |                }
  |                else
  |                {
  |                   metaType = metaTypeFactory.resolve(propertyInfo.getType());
  |                }
  | 
  | should create CollectionMetaType for collections. 

Once I've fixed this, I had to update MockProfileService as well.
So this means that the real ProfileServiceImpl must be updated as well.
This can be my TODO, or see how this was done in the mock.

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

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



More information about the jboss-dev-forums mailing list