code: public Deployment deploy(URL url, Context context, ClassLoader parent) throws DeployException
     {
        FileInputStream fis = null;
        try
        {
           File dashRaXml = new File(url.toURI());
  
           ResourceAdapterParser parser = new ResourceAdapterParser();
           
           fis = new FileInputStream(dashRaXml);
           
           XMLStreamReader xsr = XMLInputFactory.newInstance().createXMLStreamReader(fis);
  
           Activations activations = parser.parse(xsr);
           Merger merger = new Merger();
  
           ClassLoaderDeployer classLoaderDeployer =
              context.getKernel().getBean("ClassLoaderDeployer", ClassLoaderDeployer.class);
  
           List<org.ironjacamar.core.api.deploymentrepository.Deployment> deployments =
              new ArrayList<org.ironjacamar.core.api.deploymentrepository.Deployment>();
           
           for (Activation activation : activations.getActivations())
           {
              Metadata metadata = metadataRepository.findByName(activation.getArchive());
  
              if (metadata == null)
                 throw new DeployException("Deployment " + activation.getArchive() + " not found");
  
              Connector c = metadata.getMetadata();
              File archive = metadata.getArchive();
  
              Connector actC = merger.merge(c.copy(), activation);
              
              // Create a class loader for the archive
              context.put(Constants.ATTACHMENT_ARCHIVE, archive);
              classLoaderDeployer.clone().deploy(url, context, parent);
              KernelClassLoader cl = (KernelClassLoader)context.get(Constants.ATTACHMENT_CLASSLOADER);
              
              deployments.add(activate(actC, activation, activation.getArchive(), archive, cl));
           }
  
           return new ActivationDeployment(url, deployments, deploymentRepository, deployments.get(0).getClassLoader());
        }
        catch (DeployException de)
        {
           log.error(de.getMessage(), de);
           throw de;
        }
        catch (Throwable t)
        {
           log.error(t.getMessage(), t);
           throw new DeployException("Deployment " + url.toExternalForm() + " failed", t);
        }
        finally
        {
           if (fis != null)
           {
              try
              {
                 fis.close();
              }
              catch (IOException ignore)
              {
                 // Ignore
              }
           }
        }
     }
docs: {@inheritDoc}