code: public Deployment deploy(URL url, Context context, ClassLoader parent) throws DeployException
     {
        File archive = (File)context.get(Constants.ATTACHMENT_ARCHIVE);
  
        if (archive == null)
           throw new DeployException("Deployment " + url.toExternalForm() + " not found");
  
        FileInputStream fis = null;
        try
        {
           File raXml = new File(archive, "META-INF/ra.xml");
  
           if (raXml.exists())
           {
              RaParser parser = new RaParser();
  
              fis = new FileInputStream(raXml);
              
              XMLStreamReader xsr = XMLInputFactory.newInstance().createXMLStreamReader(fis);
  
              Connector c = parser.parse(xsr);
  
              context.put(Constants.ATTACHMENT_RA_XML_METADATA, c);
           }
  
           return null;
        }
        catch (Throwable t)
        {
           throw new DeployException("Deployment " + url.toExternalForm() + " failed", t);
        }
        finally
        {
           if (fis != null)
           {
              try
              {
                 fis.close();
              }
              catch (IOException ignore)
              {
                 // Ignore
              }
           }
        }
     }
docs: {@inheritDoc}