Package org.jboss.metadata.rar.spec

Examples of org.jboss.metadata.rar.spec.ConnectorMetaData


      super(name);
   }
  
   public void testEverything() throws Exception
   {
      ConnectorMetaData connector = unmarshal();
      assertNotNull(connector);
      assertEverything(connector);
   }
View Full Code Here


    * @return The metadata
    * @exception Exception Thrown if an error occurs
    */
   public ConnectorMetaData getStandardMetaData(File root) throws Exception
   {
      ConnectorMetaData result = null;

      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();

      MutableSchemaResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      resolver.mapLocationToClass("connector_1_6.xsd", JCA16MetaData.class);
      resolver.mapLocationToClass("connector_1_5.xsd", JCA15MetaData.class);
      resolver.mapLocationToClass("connector_1_5.dtd", JCA15DTDMetaData.class);
      resolver.mapLocationToClass("connector_1_6.dtd", JCA16DTDMetaData.class);
      resolver.mapLocationToClass("connector_1_0.dtd", JCA10DTDMetaData.class);
      resolver.mapLocationToClass("connector", JCA16DefaultNSMetaData.class);

      File metadataFile = new File(root, "/META-INF/ra.xml");

      if (metadataFile.exists())
      {
         String url = metadataFile.getAbsolutePath();
         try
         {
            long start = System.currentTimeMillis();

            result = (ConnectorMetaData) unmarshaller.unmarshal(url, resolver);

            log.debug("Total parse for " + url + " took " + (System.currentTimeMillis() - start) + "ms");

            if (trace)
            {
               log.trace("successful parse " + result.getVersion() + " rar package " + result);
            }

         }
         catch (Exception e)
         {
View Full Code Here

TOP

Related Classes of org.jboss.metadata.rar.spec.ConnectorMetaData

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.