[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: NPE with new parsing in aop-mc-int tests

alesj do-not-reply at jboss.com
Wed Apr 2 06:49:22 EDT 2008


"kabir.khan at jboss.com" wrote : Since AOPDeployment does not exist in mc trunk, how does the aop stuff even get parsed at the moment? 
  | 
I've got this

  | package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
  | 
  | import java.util.List;
  | 
  | import javax.xml.bind.annotation.XmlAnyElement;
  | import javax.xml.bind.annotation.XmlElement;
  | import javax.xml.bind.annotation.XmlElements;
  | import javax.xml.bind.annotation.XmlNsForm;
  | import javax.xml.bind.annotation.XmlRootElement;
  | import javax.xml.bind.annotation.XmlType;
  | 
  | import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
  | import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
  | import org.jboss.managed.api.annotation.ManagementObject;
  | import org.jboss.managed.api.annotation.ManagementProperties;
  | import org.jboss.xb.annotations.JBossXmlSchema;
  | 
  | /**
  |  * 
  |  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  |  * @version $Revision: 1.1 $
  |  */
  | @ManagementObject(properties = ManagementProperties.EXPLICIT) // TODO - explicitly add props we want to manage 
  | @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;
  |    
  |    
  |    @XmlElements
  |    ({
  |       @XmlElement(name="aspect", type=AspectBeanMetaDataFactory.class),
  |       @XmlElement(name="interceptor", type=InterceptorBeanMetaDataFactory.class),
  |       @XmlElement(name="bind", type=BindBeanMetaDataFactory.class),
  |       @XmlElement(name="stack", type=StackBeanMetaDataFactory.class),
  |       @XmlElement(name="typedef", type=TypeDefBeanMetaDataFactory.class),
  |       @XmlElement(name="cflow-stack", type=CFlowStackBeanMetaDataFactory.class)
  |    })
  |    @XmlAnyElement
  |    public void setBeanFactories(List<BeanMetaDataFactory> beanFactories)
  |    {
  |       super.setBeanFactories(beanFactories);
  |    }
  | }
  | 
Looks like old stuff (see diff package):

  |       addJaxbSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.metadata.AOPDeployment");
  | 
Why is it still there? :-)

If the metadata class is not there, you get this ignore in SingletonSchemaResolverFactory:

  |    public boolean addJaxbSchema(String namespace, String reference)
  |    {
  |       try
  |       {
  |          resolver.addClassBinding(namespace, reference);
  |          if (log.isTraceEnabled())
  |             log.trace("Mapped '" + namespace + "' to '" + reference + "'");
  |          return true;
  |       }
  |       catch (Exception ignored)
  |       {
  |          if (log.isTraceEnabled())
  |             log.trace("Ignored: ", ignored);
  |          return false;
  |       }
  |    }
  | 

And then you get the null in beanfactories - a jbossxb problem Adrian mentioned.

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

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



More information about the jboss-dev-forums mailing list