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

kabir.khan@jboss.com do-not-reply at jboss.com
Thu Feb 21 13:10:45 EST 2008


When setting up my schema resolver

  |    private TestSchemaResolver setupResolver()
  |    {
  |       TestSchemaResolver resolver = new TestSchemaResolver();
  |     
  |       
  |       SchemaBinding binding1 = addSchemaBinding(resolver, AbstractKernelDeployment.class);
  |       SchemaBinding binding2 = addSchemaBinding(resolver, AOPDeployment.class);
  |       SchemaBinding binding3 = addSchemaBinding(resolver, AspectBeanMetaDataFactory.class);
  |       SchemaBinding binding4 = addSchemaBinding(resolver, JavaBean.class);
  |       
  |       return resolver;
  |    }
  | 
  |    private SchemaBinding addSchemaBinding(TestSchemaResolver resolver, Class<?> clazz)
  |    {
  |       SchemaBinding binding = JBossXBBuilder.build(clazz);
  |       resolver.addSchemaBinding(binding);
  |       return binding;
  |    }
  | 

the AspectBeanMetaDataFactory replaces the AOPDeployment, which is obvious having looked at the TestSchemaResolver. For AbstractKernelDeployment, all the associated metadata classes are added. My guess is that this is because they are referenced somehow by the AbstractKernelDeployment. If I have understood the previous posts correctly, the AOPDeployment should be kept simple, i.e.:


  | @JBossXmlSchema(namespace="urn:jboss:aop-beans:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
  | @XmlRootElement(name="aop")
  | @XmlType(propOrder={"annotations", "classLoader", "beanFactories", "create", "start", "stop", "destroy", "aliases"})
  | public class AOPDeployment extends AbstractKernelDeployment
  | {
  |    private static final long serialVersionUID = 1L;   
  | }
  | 

The question is how do I get metadata classes such as AspectBeanMetaDataFactory, into the same SchemaBinding as AOPDeployment (into binding2)? 

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

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



More information about the jboss-dev-forums mailing list