[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Implementing JAXB style parsing for aop-mc-int

adrian@jboss.org do-not-reply at jboss.com
Wed Feb 27 13:18:31 EST 2008


Even if you fix it to extends GenericBeanMetaDataFactory2 (or use your own factory),
what you are trying to do isn't going to work at the moment.

1) With the way the MC beans are currently marked up, there is no global
type "property" in the MC schema. i.e. there is no @XmlRootElement
or type name here:

  | @XmlType(propOrder={"annotations", "value"})
  | public class AbstractPropertyMetaData
  | 

It should be something like this to conform with the schema document

  | @XmlRootElement(name="property")
  | @XmlType(name="property" propOrder={"annotations", "value"})
  | 

This is obviously wrong and needs fixing.
The same is true for a number of other types.

2) But even if we did this, the way the builder is currently working
is that if it finds a class in your class hierarchy, it will add it to your namespace.

One way to fix this would be to mark it up as 

  | @XmlRootElement(name="property" namespace="urn:jboss:bean-deployer:2.0")
  | @XmlType(name="property" namespace="urn:jboss:bean-deployer:2.0")
  | 
but we don't want to do this, because then the MC couldn't re-use this class across
versions.

I know Alex added a feature where he introduced an xmlns annotation,
but I don't know if it solves this problem. We'd need to ask him.

3) The third point is that you just leave it as it
and have all the mc elements and types in your namespace
which means that users won't have to specify xmlns tags.


  | <aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
  |    	<property name="dependency"><inject bean="Dependency"/></property>
  | </aspect>
  | 

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

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



More information about the jboss-dev-forums mailing list