1 Reply Latest reply on Jul 9, 2010 3:43 PM by emuckenhuber

    Understanding deployment namespace schema with metadata parsing

    saltnlight5

      Hi,

       

      I am trying to understand how the deployment xml file namespace is registered with JBossXB and how new/custom ones are added.

       

      So far I see that org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory has pre initialized these namespace schema with their BeanMetaDataFactory implementations.

       

            addJaxbSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.metadata.AOPDeployment");
            addJaxbSchema("urn:jboss:bean-deployer", "org.jboss.kernel.plugins.deployment.AbstractKernelDeployment10");
            addJaxbSchema("urn:jboss:bean-deployer:2.0", "org.jboss.kernel.plugins.deployment.AbstractKernelDeployment");
            addJaxbSchema("urn:jboss:javabean:1.0", "org.jboss.javabean.plugins.jaxb.JavaBean10");
            addJaxbSchema("urn:jboss:javabean:2.0", "org.jboss.javabean.plugins.jaxb.JavaBean20");
            addJaxbSchema("urn:jboss:policy:1.0", "org.jboss.beans.metadata.plugins.policy.AbstractPolicyMetaData");
            addJaxbSchema("urn:jboss:classloading:1.0", "org.jboss.classloading.spi.metadata.ClassLoadingMetaData10");
            addJaxbSchema("urn:jboss:classloader:1.0", "org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory10");
            addJaxbSchema("urn:jboss:deployers:2.0", "org.jboss.deployers.vfs.plugins.xb.SchemaResolverDeployerMetaData");
      

       

      So how are newly defined schemas registered? For example the org.jboss.hibernate.deployers.metadata.HibernateMetaData, when or what is parsing the JBossXmlSchema annotation? Is this all there is needed to registered with new BeanMetaDataFactory?

       

      Thanks,

      Zemian Deng

        • 1. Re: Understanding deployment namespace schema with metadata parsing
          emuckenhuber

          Well @JBossXmlSchema only works with jboss-xb. The namspaces/schemas you listed are just the default namespaces registered in the SingletonSchemaResolverFactory. Additional namespaces can be registered in multiple ways. For example in deployers/metadata-deployers-jboss-beans.xml the SchemaResolverConfig. Additionally if you implement a deployer extending SchemaResolverDeployer the registration can be done automatically. You could also register it directly using the SchemaResolverFactory.