Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.UnmarshallerFactory


               VirtualFile jbossStructure = file.getChild("META-INF/jboss-structure.xml");
               if (jbossStructure != null)
               {
                  log.trace("... context has a META-INF/jboss-structure.xml");
                  URL url = jbossStructure.toURL();
                  UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
                  Unmarshaller unmarshaller = factory.newUnmarshaller();
                  StructureMetaDataObjectFactory ofactory = new StructureMetaDataObjectFactory();
                  unmarshaller.unmarshal(url.toString(), ofactory, structureContext.getMetaData());
                  isJBossStructure = true;
               }
            }
View Full Code Here


   public static BootstrapMetaData parse(URL url)
   {
      if (url == null)
         throw new IllegalArgumentException("Null url");
     
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      try
      {
         BootstrapMetaData result = (BootstrapMetaData) unmarshaller.unmarshal(url.toString(), new BootstrapSchemaBinding());
         if (result == null)
            throw new IllegalStateException("The bootsrap xml " + url + " is not well formed");
View Full Code Here

   public static BootstrapMetaData parse(URL url)
   {
      if (url == null)
         throw new IllegalArgumentException("Null url");

      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      try
      {
         BootstrapMetaData result = (BootstrapMetaData) unmarshaller.unmarshal(url.toString(),
               new BootstrapSchemaBinding());
         if (result == null)
View Full Code Here

                  {
                     ofactory = new StructureMetaDataObjectFactory();
                  }

                  URL url = jbossStructure.toURL();
                  UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
                  Unmarshaller unmarshaller = factory.newUnmarshaller();
                  unmarshaller.unmarshal(url.toString(), ofactory, structureContext.getMetaData());
                  mountChildren(structureContext);
                  isJBossStructure = true;
               }
            }
View Full Code Here

   }
  
   public void test1() throws Exception
   {
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("interceptor/ejb-jar.xml");
      EjbJar30MetaData ejbJarMetaData = (EjbJar30MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(EjbJar30MetaData.class));
      JBoss50MetaData metaData = new JBoss50MetaData();
      metaData.merge(null, ejbJarMetaData);
     
View Full Code Here

   }
  
   public void testSameMethodName() throws Exception
   {
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("interceptor/ejb-jar.xml");
      EjbJar30MetaData ejbJarMetaData = (EjbJar30MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(EjbJar30MetaData.class));
      JBoss50MetaData metaData = new JBoss50MetaData();
      metaData.merge(null, ejbJarMetaData);
     
View Full Code Here

   }

   public void test1() throws Exception
   {
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("securitydomain/jboss.xml");
      JBoss50MetaData metaData = (JBoss50MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(JBoss50MetaData.class));
     
      JBossEnterpriseBeanMetaData beanMetaData = metaData.getEnterpriseBean("SecurityDomainBean");
      assertNotNull(beanMetaData);
View Full Code Here

   public static KernelDeployment parse(File fp)
           throws JBossXBException, MalformedURLException
   {
      long start = System.currentTimeMillis();
      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(fp.toURL().toString(), resolver);
      long end = System.currentTimeMillis() - start;
      System.out.println("XML parsing took: " + end);
      return deployment;
   }
View Full Code Here

   }

   public static KernelDeployment parse(URL url) throws JBossXBException, MalformedURLException
   {
      SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      return (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
   }
View Full Code Here

            try
            {
               VirtualFile jbossStructure = file.findChild("META-INF/jboss-structure.xml");
               log.trace("... context has a META-INF/jboss-structure.xml");
               URL url = jbossStructure.toURL();
               UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
               Unmarshaller unmarshaller = factory.newUnmarshaller();
               StructureMetaDataObjectFactory ofactory = new StructureMetaDataObjectFactory();
               unmarshaller.unmarshal(url.toString(), ofactory, metaData);
               isJBossStructure = true;
            }
            catch (IOException e)
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.UnmarshallerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.