That looks like it should work.

I have some observations about the new implementation.

1) There is no logging so I can't see what is happening. I started adding some.
This was present in the old implementation, including being able to see
what rules where defined.

2) There are a number of places that assume that all collections are lists,
I have some sets.

3) I also need support for Maps.

4) I don't see how I define that a type should be a collection and the exact 
implementation
of that collection, like i did before:

  | <deployment> <!-- AbstractDeploymentMetaData.setBeans(List)
  |    <beans> <!-- ArrayList -->
  |         <bean>
  | 
  | objectModelFactory.mapElementToClass("deployment", 
AbstractKernelDeployment.class);
  | objectModelFactory.mapElementToClass("beans", ArrayList.class);
  | objectModelFactory.mapElementToClass("bean", AbstractBeanMetaData.class);
  | 

Although the need to have <beans/> is removed in the new implementation
which makes the xml less verbose. :-)
I still think it would be good to be able to define the implementation class.
NOTE: I don't want to construct the collection in my javabean because I want
null when there is none.

5) The ability to define the value as something other than string is good:

  |       XmlValueBinding stringValue = factory.bindValue(attribute, "value", 
StringValueMetaData.class);
  |       factory.bindValue(stringValue, "value", String.class);
  | 
  | This has got rid of my need to write the longwinded
  | <attribute name="blah"><value>foo</value></attribute>
  | 

6) When you say it does not work for attributes, do you mean
attributes don't work at all? Or maybe I'm just not using it correctly?

  |       factory.bindAttribute(bean, "", "name", "name", String.class);
  | 

7) Should I even have to define String attributes that map directly onto the 
javabean?

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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to