Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.UnmarshallerFactory.newUnmarshaller()


   {
      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

           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);
   }

   public static void store(KernelDeployment deployment, File binFile) throws Exception
   {
View Full Code Here

            {
               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

/* 138 */       VirtualFile jbossAppXml = getMetaDataFile(file, "META-INF/jboss-app.xml");
/*     */
/* 141 */       boolean scan = true;
/*     */
/* 143 */       UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
/* 144 */       Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
/* 145 */       EarMetaData specMetaData = null;
/* 146 */       JBossAppMetaData appMetaData = null;
/* 147 */       if (applicationXml != null)
/*     */       {
/* 149 */         InputStream in = applicationXml.openStream();
View Full Code Here

/*    */
/*    */   protected ConnectorMetaData getConnectorMetaData() throws Exception
/*    */   {
/* 70 */     ObjectModelFactory factory = new ResourceAdapterObjectModelFactory();
/* 71 */     UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
/* 72 */     Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
/*    */
/* 74 */     URL rar = Thread.currentThread().getContextClassLoader().getResource(this.rarName);
/* 75 */     JarFile rarFile = new JarFile(rar.getFile());
/* 76 */     ZipEntry entry = rarFile.getEntry("META-INF/ra.xml");
/*    */
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.