Examples of UnmarshallerFactory


Examples of org.jboss.xb.binding.UnmarshallerFactory

     
      // To make surefire happy
      Thread.currentThread().setContextClassLoader(AnnotatedExcludeDefaultBean.class.getClassLoader());
     
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("exclude/META-INF/ejb-jar.xml");
      EjbJar30MetaData metaData = (EjbJar30MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(EjbJar30MetaData.class));
      JBoss50MetaData jbossMetaData = new JBoss50MetaData();
      jbossMetaData.merge(null, metaData);
     
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

     
      // To make surefire happy
      Thread.currentThread().setContextClassLoader(AnnotatedExcludeDefaultForMethodBean.class.getClassLoader());
     
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("exclude/META-INF/ejb-jar.xml");
      EjbJar30MetaData metaData = (EjbJar30MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(EjbJar30MetaData.class));
      JBoss50MetaData jbossMetaData = new JBoss50MetaData();
      jbossMetaData.merge(null, metaData);
     
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

   {
      TwoLifecycleMethodsBean.annotatedPostConstructRan = false;
      TwoLifecycleMethodsBean.otherPostConstructRan = false;
     
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("metadatacomplete/META-INF/ejb-jar.xml");
      assertNotNull("Can't find descriptor metadatacomplete/META-INF/ejb-jar.xml", url);
      EjbJar30MetaData metaData = (EjbJar30MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(EjbJar30MetaData.class));
      JBoss50MetaData jbossMetaData = new JBoss50MetaData();
      jbossMetaData.merge(null, metaData);
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

   @Before
   public void before() throws Exception
   {
      // Bootstrap metadata
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      URL url = Thread.currentThread().getContextClassLoader().getResource("ejbthree1595/META-INF/ejb-jar.xml");
      assertNotNull("Can't find descriptor ejbthree1595/META-INF/ejb-jar.xml", url);
      EjbJar30MetaData metaData = (EjbJar30MetaData) unmarshaller.unmarshal(url.toString(), schemaResolverForClass(EjbJar30MetaData.class));
      JBoss50MetaData jbossMetaData = new JBoss50MetaData();
      jbossMetaData.merge(null, metaData);
View Full Code Here

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, metaData);
                  isJBossStructure = true;
               }
            }
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

               {
                  if (trace)
                     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());
                  mountChildren(structureContext);
                  isJBossStructure = true;
               }
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

      catch (IOException e)
      {
         throw new RuntimeException("Failed to get resources: conf/mc-int-config.xml", e);
      }

      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();

      while (urls.hasMoreElements())
      {
         URL url = urls.nextElement();
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

      catch (IOException e)
      {
         throw new RuntimeException("Failed to get resources: conf/mc-int-config.xml", e);
      }

      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();

      while (urls.hasMoreElements())
      {
         URL url = urls.nextElement();
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

      if (ddResource != null)
      {
         log.debug("found ejb-jar.xml " + ddResource);

         factory = new EjbJarDDObjectFactory();
         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
         unmarshaller = unmarshallerFactory.newUnmarshaller();
         unmarshaller.setEntityResolver(new JBossEntityResolver());
         unmarshaller.setNamespaceAware(true);
         unmarshaller.setSchemaValidation(true);
         unmarshaller.setValidation(true);
View Full Code Here

Examples of org.jboss.xb.binding.UnmarshallerFactory

   }

   protected JBossWebMetaData unmarshal(String name, Class clazz)
      throws Exception
   {
      UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = factory.newUnmarshaller();
      unmarshaller.setSchemaValidation(true);
      URL webXml = getClass().getResource(name);
      if (webXml == null)
         throw new IllegalStateException("Unable to find: "+name);
      SchemaBinding schema = JBossXBBuilder.build(clazz);
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.