Examples of ArchiveDeployment


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

                throw new DeploymentUnitProcessingException("failed to resolve module / classloader for deployment " + unit);
            }
        } else {
            classLoader = module.getClassLoader();
        }
        final ArchiveDeployment dep = this.newDeployment(unit.getName(), classLoader);

        if (root != null) {
            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 "
                        + unit);
            }
            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);
        }

        if (root != null) {
            dep.setRootFile(new VirtualFileAdaptor(root));
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

     * @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

     * @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

                throw MESSAGES.classLoaderResolutionFailed(unit);
            }
        } else {
            classLoader = module.getClassLoader();
        }
        final ArchiveDeployment dep = this.newDeployment(unit.getName(), classLoader);

        if (unit.getParent() != null) {
            final String parentDeploymentName = unit.getParent().getName();
            final Module parentModule = unit.getParent().getAttachment(Attachments.MODULE);
            if (parentModule == null) {
                throw MESSAGES.classLoaderResolutionFailed(deploymentRoot);
            }
            final ClassLoader parentClassLoader = parentModule.getClassLoader();

            ROOT_LOGGER.creatingUnifiedWebservicesDeploymentModel(unit.getParent());
            final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
            dep.setParent(parentDep);
        }

        if (root != null) {
            dep.setRootFile(new VirtualFileAdaptor(root));
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(DeploymentInfo di)
   {
      ArchiveDeployment dep = newDeployment(di);
      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
      dep.setRuntimeClassLoader(null);
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      WebMetaData webMetaData = (WebMetaData)di.metaData;
      if (webMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain web meta data");

      WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
      if (wsMetaData == null)
         throw new IllegalStateException("Deployment unit does not contain webservices meta data");

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

      for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
      {
         for (PortComponentMetaData pcmd : wsd.getPortComponents())
         {
            String servletLink = pcmd.getServletLink();
            if (servletLink == null)
               throw new IllegalStateException("servlet-link cannot be null");

            Servlet servlet = getServletForName(webMetaData, servletLink);
            String servletClass = servlet.getServletClass();

            try
            {
               ClassLoader loader = dep.getInitialClassLoader();
               Class<?> epBean = loader.loadClass(servletClass.trim());

               // If this is a servlet we defer the the bean creation
               if (javax.servlet.Servlet.class.isAssignableFrom(epBean))
                  servletClass = null;
View Full Code Here

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

   }

   @Override
   public Deployment createDeployment(DeploymentInfo di)
   {
      ArchiveDeployment dep = newDeployment(di);
      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
      dep.setRuntimeClassLoader(di.ucl);
      dep.setType(getDeploymentType());

      Service service = dep.getService();

      Ejb3ModuleMBean ejb3Module = EJBArchiveMetaDataAdapterEJB3.getEJB3Module(di.deployedObject);
      for (Object manager : ejb3Module.getContainers().values())
      {
         if (manager instanceof EJBContainer)
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.