Package org.jboss.wsf.spi.deployment

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


    *
    * @param unit deployment unit
    */
   public final void newDeploymentModel(final DeploymentUnit unit)
   {
      final ArchiveDeployment dep = this.newDeployment(unit);

      this.build(dep, unit);

      dep.addAttachment(DeploymentUnit.class, unit);
      unit.addAttachment(Deployment.class, dep);
   }
View Full Code Here


    * @return archive deployment
    */
   private ArchiveDeployment newDeployment(final DeploymentUnit unit)
   {
      this.log.debug("Creating new WS deployment model for: " + unit);
      final ArchiveDeployment dep = this.newDeployment(unit.getSimpleName(), unit.getClassLoader());

      if (unit instanceof VFSDeploymentUnit)
      {
         final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
         final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(AbstractDeploymentModelBuilder.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));
      }

      if (unit.getParent() != null)
      {
         final String parentDeploymentName = unit.getParent().getSimpleName();
         final ClassLoader parentClassLoader = unit.getParent().getClassLoader();

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

      if (unit instanceof VFSDeploymentUnit)
      {
View Full Code Here

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

                throw MESSAGES.classLoaderResolutionFailed(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) {
                ROOT_LOGGER.cannotLoadMetaDataFiles(e, root);
            }
        }

        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

   {
      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

   }

   @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();

      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
      if (ejb3Deployment == null)
         throw new IllegalStateException("Deployment unit does not contain ejb3 deployment");

      // Copy the attachments
      dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);

      WebServiceDeployment apiAdapter = WebServiceDeploymentApiAdapter.createInstance(ejb3Deployment);
      Iterator<WebServiceDeclaration> it = apiAdapter.getServiceEndpoints().iterator();
      while (it.hasNext())
      {
View Full Code Here

   }

   @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");

      // Copy the attachments
      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
      dep.addAttachment(JBossMetaData.class, jbmd);

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

   }

   public void init(Endpoint ep)
   {
      String ejbName = ep.getShortName();
      ArchiveDeployment dep = (ArchiveDeployment)ep.getService().getDeployment();
      String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + dep.getSimpleName();
      if (dep.getParent() != null)
      {
         nameStr += ",ear=" + dep.getParent().getSimpleName();
      }

      objectName = ObjectNameFactory.create(nameStr.toString());

      if (houston.getInstalledContext( objectName.getCanonicalName() ) == null)
View Full Code Here

   }

   @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

    * 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

TOP

Related Classes of org.jboss.wsf.spi.deployment.ArchiveDeployment

Copyright © 2018 www.massapicom. 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.