There are a number of problems with that approach,
but I'm open to suggestions if you have a cleaner solution.

1) Class vs Bean abstraction

ClassAdapter is in container whereas BeanMetaData is part of kernel.

Also BeanMetaData deals with properties, e.g.

  | <property name="whatever">
  |    <annotation name="SecurityRoles" value="Manager"/>
  | </property>
  | 

Whereas the ClassAdaptor would only know about fields or getter/setters.

There is an impedence between the plain class model and the javabean model.

2) Controlling instances

How are you told/remember you want a class level or instance level 
ClassAdapter/JoinpointFactory.

3) The type model is not restricted to the top level beans

The kernel also needs to get hold of ClassInfo objects for configuration like:

  | <bean class="MyClass">
  |    <property name="array">
  |        <array type="java.net.URL">
  |            <value>http://localhost:8080</value>
  | </>
  | 

Ideally, I want to use the same class model and joinpoint model for
both the "class=" and "type="
rather than having to do it in different ways depending on
which part of the metadata it appears.

So I want some hook into the ClassInfos even when it is not BeanMetaData.

The problem is essential how does the value metadata handle the following:

  |    /**
  |     * Get the value.
  |     * 
  |     * @param info the type info
  |     * @return the value.
  |     * @throws Throwable for any error
  |     */
  |    Object getValue(TypeInfo info) throws Throwable;
  | 

when the value metadata could be StringValueMetaData or CollectionValueMetaData
or XXXXValueMetaData that creates values/Objects based on whatever rules you 
like
but it still needs to know the target type, either from the property itself or 
it is told it
in the case that you want to be explicit and use a specific concrete 
implementation.


  | public List getWhatever();
  | public void setWhatever(List);
  |    <property name="whatever" type="java.util.ArrayList">
  | ...
  | 

See also:
http://jira.jboss.com/jira/browse/JBMICROCONT-29

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

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


-------------------------------------------------------
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