Examples of ArchiveDeployment


Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

   }

   @Override
   public Deployment createDeployment(DeploymentUnit unit)
   {
      ArchiveDeployment dep = newDeployment(unit);
      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
      dep.setRuntimeClassLoader(unit.getClassLoader());
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      JBossMetaData jbmd = unit.getAttachment(JBossMetaData.class);
      if (jbmd == null)
         throw new IllegalStateException("Deployment unit does not contain application meta data");

      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
      if (wsMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain webservices meta data");

      WebServiceDeployment webServiceDeployment = unit.getAttachment(WebServiceDeployment.class);
      if (webServiceDeployment == null)
         throw new IllegalStateException("Deployment unit does not contain webServiceDeployment");
     
      // Copy the attachments
      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
      dep.addAttachment(JBossMetaData.class, jbmd);
      dep.addAttachment(WebServiceDeployment.class, webServiceDeployment);

      for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
      {
         for (PortComponentMetaData pcmd : wsd.getPortComponents())
         {
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

   }

   @Override
   public Deployment createDeployment(DeploymentUnit unit)
   {
      ArchiveDeployment dep = newDeployment(unit);
      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));    
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
      if (webMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain web meta data");

      // Copy the attachments
      dep.addAttachment(JBossWebMetaData.class, webMetaData);

      List<ServletMetaData> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
      for (ServletMetaData servlet : servlets)
      {
         String servletName = servlet.getName();
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

    * Create an endpoint for every servlet-link in webservices.xml
    */
   @Override
   public Deployment createDeployment(DeploymentUnit unit)
   {
      ArchiveDeployment dep = newDeployment(unit);
      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
      dep.setRuntimeClassLoader(null);
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
      if (webMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain web meta data");

      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
      if (wsMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain webservices meta data");

      // Copy the attachments
      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
      dep.addAttachment(JBossWebMetaData.class, webMetaData);

      for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
      {
         for (PortComponentMetaData pcmd : wsd.getPortComponents())
         {
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

   }

   @Override
   public Deployment createDeployment(DeploymentUnit unit)
   {
      ArchiveDeployment dep = newDeployment(unit);
      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
      dep.setRuntimeClassLoader(unit.getClassLoader());
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      WebServiceDeployment webServiceDeployment = unit.getAttachment(WebServiceDeployment.class);
      if (webServiceDeployment == null)
         throw new IllegalStateException("Deployment unit does not contain webServiceDeployment");

      // Copy the attachments
      dep.addAttachment(WebServiceDeployment.class, webServiceDeployment);

      Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
      while (it.hasNext())
      {
         WebServiceDeclaration container = it.next();
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

     * @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
     *
     * @param unit deployment unit
     */
    public final void newDeploymentModel(final DeploymentUnit unit) {
        final ArchiveDeployment dep;
        if (unit.hasAttachment(DEPLOYMENT_KEY)) {
            dep = (ArchiveDeployment) unit.getAttachment(DEPLOYMENT_KEY);
        } else {
            dep = newDeployment(unit);
            propagateAttachments(unit, dep);
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

            }
        } else {
            classLoader = module.getClassLoader();
        }

        ArchiveDeployment parentDep = null;
        if (unit.getParent() != null) {
            final Module parentModule = unit.getParent().getAttachment(Attachments.MODULE);
            if (parentModule == null) {
                throw WSLogger.ROOT_LOGGER.classLoaderResolutionFailed(deploymentRoot);
            }
            WSLogger.ROOT_LOGGER.tracef("Creating new unified WS deployment model for %s", unit.getParent());
            parentDep = this.newDeployment(null, unit.getParent().getName(), parentModule.getClassLoader(), null);
        }

        final UnifiedVirtualFile uvf = root != null ? new VirtualFileAdaptor(root) : new ResourceLoaderAdapter(classLoader);
        final ArchiveDeployment dep = this.newDeployment(parentDep, unit.getName(), classLoader, uvf);

        //add an AnnotationInfo attachment that uses composite jandex index
        dep.addAttachment(AnnotationsInfo.class, new JandexAnnotationsInfo(unit));

        return dep;
    }
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

     * @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
     *
     * @param unit deployment unit
     */
    public final void newDeploymentModel(final DeploymentUnit unit) {
        final ArchiveDeployment dep;
        try {
            dep = this.newDeployment(unit);
        } catch (DeploymentUnitProcessingException e) {
            throw new RuntimeException(e);
        }

        this.build(dep, unit);

        dep.addAttachment(DeploymentUnit.class, unit);
        unit.putAttachment(WSAttachmentKeys.DEPLOYMENT_KEY, dep);
    }
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

        final Module module = unit.getAttachment(Attachments.MODULE);
        if (module == null) {
            throw new DeploymentUnitProcessingException("failed to resolve module for deployment " + deploymentRoot);
        }
        final ClassLoader classLoader = module.getClassLoader();
        final ArchiveDeployment dep = this.newDeployment(unit.getName(), classLoader);

        try {
            List<VirtualFile> virtualFiles = root.getChildrenRecursively(WS_FILE_FILTER);
            final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
            for (VirtualFile vf : virtualFiles) {
                // Adding the roots of the virtual files.
                uVirtualFiles.add(new VirtualFileAdaptor(vf));
            }
            dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
        } catch (IOException e) {
            this.log.warn("Could not load metadata files for deployment root " + root, e);
        }

        if (unit.getParent() != null) {
            final String parentDeploymentName = unit.getParent().getName();
            final Module parentModule = unit.getParent().getAttachment(Attachments.MODULE);
            if (parentModule == null) {
                throw new DeploymentUnitProcessingException("failed to resolve module for parent of deployment "
                        + deploymentRoot);
            }
            final ClassLoader parentClassLoader = parentModule.getClassLoader();

            this.log.debug("Creating new WS deployment model for parent: " + unit.getParent());
            final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
            dep.setParent(parentDep);
        }

        dep.setRootFile(new VirtualFileAdaptor(root));
        dep.setRuntimeClassLoader(classLoader);
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

   {
      dep.setType(DeploymentType.JAXWS_JSE);

      if (dep instanceof ArchiveDeployment)
      {
         ArchiveDeployment arc = (ArchiveDeployment)dep;
         UnifiedVirtualFile rootFile = arc.getRootFile();
         if (rootFile == null)
         {
            rootFile = new ResourceLoaderAdapter(dep.getInitialClassLoader());
            arc.setRootFile(rootFile);
         }
      }
     
      ClassLoader rtcl = dep.getRuntimeClassLoader();
      if (rtcl == null)
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.ArchiveDeployment

   {
      dep.setType(DeploymentType.JAXWS_JSE);

      if (dep instanceof ArchiveDeployment)
      {
         ArchiveDeployment arc = (ArchiveDeployment)dep;
         UnifiedVirtualFile rootFile = arc.getRootFile();
         if (rootFile == null)
         {
            rootFile = new ResourceLoaderAdapter(dep.getInitialClassLoader());
            arc.setRootFile(rootFile);
         }
      }
     
      ClassLoader rtcl = dep.getRuntimeClassLoader();
      if (rtcl == null)
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.