code: public Connector getStandardMetaData(File root) throws Exception
     {
        Connector result = null;
        File metadataFile = new File(root, "/META-INF/ra.xml");
  
        if (metadataFile.exists())
        {
           InputStream input = null;
           String url = metadataFile.getAbsolutePath();
           try
           {
              long start = System.currentTimeMillis();
              input = new FileInputStream(metadataFile);
  
              XMLStreamReader xsr = XMLInputFactory.newInstance().createXMLStreamReader(input);
  
              result = (new RaParser()).parse(xsr);
  
              log.debugf("Total parse for %s took %d ms", url, (System.currentTimeMillis() - start));
           }
           catch (Exception e)
           {
              log.parsingErrorRaXml(url, e);
              throw e;
           }
           finally
           {
              if (input != null)
                 input.close();
           }
  
        }
        else
        {
           log.tracef("metadata file %s does not exist", metadataFile.toString());
        }
  
        return result;
     }
docs: Get the JCA standard metadata
  @param root The root of the deployment
  @return The metadata
  @exception Exception Thrown if an error occurs