Package org.jboss.wsf.spi.deployment

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


      else if (WSHelper.isJaxwsEjbDeployment(dep))
      {
         this.log.debug("Building injection meta data for JAXWS EJB3 webservice deployment: " + dep.getSimpleName());
         final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit,
               WebServiceDeployment.class);
         final Service service = dep.getService();

         // iterate through all EJB3 endpoints
         for (final WebServiceDeclaration container : webServiceDeployment.getServiceEndpoints())
         {
            final String ejbName = container.getComponentName();
            final Endpoint endpoint = service.getEndpointByName(ejbName);
            if (endpoint != null && ASHelper.isWebServiceBean(container))
            {
               // build EJB 3 injections meta data
               final EnvironmentEntriesMetaData ejbEnvEntries = this.getEnvironmentEntries(ejbName, unit);
               final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers);
View Full Code Here


      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())
      {
         WebServiceDeclaration container = it.next();
         if (isWebServiceBean(container))
         {
            String ejbName = container.getComponentName();
            String epBean = container.getComponentClassName();

            // Create the endpoint
            Endpoint ep = newEndpoint(epBean);
            ep.setShortName(ejbName);
            service.addEndpoint(ep);
         }
      }

      return dep;
   }
View Full Code Here

      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())
         {
            String ejbLink = pcmd.getEjbLink();
            if (ejbLink == null)
               throw new IllegalStateException("ejb-link cannot be null");

            JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbLink);
            if (beanMetaData == null)
               throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);

            String ejbClass = beanMetaData.getEjbClass();

            // Create the endpoint
            Endpoint ep = newEndpoint(ejbClass);
            ep.setShortName(ejbLink);
            service.addEndpoint(ep);
         }
      }
      return dep;
   }
View Full Code Here

   {
      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();
         String targetBean = getTargetBean(servlet);

         // Create the endpoint
         Endpoint ep = newEndpoint(targetBean);
         ep.setShortName(servletName);
         service.addEndpoint(ep);
      }

      return dep;
   }
View Full Code Here

      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())
         {
            String servletLink = pcmd.getServletLink();
            if (servletLink == null)
               throw new IllegalStateException("servlet-link cannot be null");

            ServletMetaData servlet = getServletForName(webMetaData, servletLink);
            String targetBean = getTargetBean(servlet);

            // Create the endpoint
            Endpoint ep = newEndpoint(targetBean);
            ep.setShortName(servletLink);
            service.addEndpoint(ep);
         }
      }

      return dep;
   }
View Full Code Here

      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())
         {
            String ejbLink = pcmd.getEjbLink();
            if (ejbLink == null)
               throw new IllegalStateException("ejb-link cannot be null");

            JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbLink);
            if (beanMetaData == null)
               throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);

            String ejbClass = beanMetaData.getEjbClass();

            // Create the endpoint
            Endpoint ep = newEndpoint(ejbClass);
            ep.setShortName(ejbLink);
            service.addEndpoint(ep);
         }
      }
      return dep;
   }
View Full Code Here

   {
      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();
         String targetBean = getTargetBean(servlet);

         // Create the endpoint
         Endpoint ep = newEndpoint(targetBean);
         ep.setShortName(servletName);
         service.addEndpoint(ep);
      }

      return dep;
   }
View Full Code Here

      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())
         {
            String servletLink = pcmd.getServletLink();
            if (servletLink == null)
               throw new IllegalStateException("servlet-link cannot be null");

            ServletMetaData servlet = getServletForName(webMetaData, servletLink);
            String targetBean = getTargetBean(servlet);

            // Create the endpoint
            Endpoint ep = newEndpoint(targetBean);
            ep.setShortName(servletLink);
            service.addEndpoint(ep);
         }
      }

      return dep;
   }
View Full Code Here

         // Create/Setup the deployment
         Deployment deployment = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());
         deployment.setRuntimeClassLoader(deployment.getInitialClassLoader());

         // Create/Setup the service
         Service service = deployment.getService();
         service.setContextRoot(contextRoot);

         // Create/Setup the endpoint
         org.jboss.wsf.spi.deployment.Endpoint ep = depModelFactory.newEndpoint(implClass.getName());
         service.addEndpoint(ep);

         // Deploy using deployment aspects
         getDeploymentAspectManager().deploy(deployment);
         deployments.put(contextRoot, deployment);
      }
View Full Code Here

      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();
         if (isWebServiceBean(container))
         {
            String ejbName = container.getComponentName();
            String epBean = container.getComponentClassName();

            // Create the endpoint
            Endpoint ep = newEndpoint(epBean);
            ep.setShortName(ejbName);

            String containName = container.getContainerName();
            if(null==containName)
               throw new IllegalArgumentException("Target container name not set");
            ep.setProperty(InvocationHandlerEJB3.CONTAINER_NAME, containName);

            service.addEndpoint(ep);
         }
      }

      return dep;
   }
View Full Code Here

TOP

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

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.