Package org.jboss.wsf.spi.deployment

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


    }

    public List<Endpoint> publish(ServiceTarget target, WSEndpointDeploymentUnit unit) throws Exception {
        List<DeploymentAspect> aspects = DeploymentAspectsProvider.getSortedDeploymentAspects();
        ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
        Deployment dep = null;
        try {
            SecurityActions.setContextClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
            WSDeploymentBuilder.getInstance().build(unit);
            dep = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
            dep.addAttachment(ServiceTarget.class, target);
            DeploymentAspectManager dam = new DeploymentAspectManagerImpl();
            dam.setDeploymentAspects(aspects);
            dam.deploy(dep);
        } finally {
            if (dep != null) {
                dep.removeAttachment(ServiceTarget.class);
            }
            SecurityActions.setContextClassLoader(origClassLoader);
        }
        Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
        deployment.addAttachment(StandardContext.class, startWebApp(host, unit)); //TODO simplify and use findChild later in destroy()/stopWebApp()
        return deployment.getService().getEndpoints();
    }
View Full Code Here


    public void destroy(Context context) throws Exception {
        List<Endpoint> eps = context.getEndpoints();
        if (eps == null || eps.isEmpty()) {
            return;
        }
        Deployment deployment = eps.get(0).getService().getDeployment();
        List<DeploymentAspect> aspects = DeploymentAspectsProvider.getSortedDeploymentAspects();
        try {
            stopWebApp(deployment.getAttachment(StandardContext.class));
        } finally {
            ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
            try {
                SecurityActions.setContextClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
                DeploymentAspectManager dam = new DeploymentAspectManagerImpl();
View Full Code Here

    @Override
    public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit unit = phaseContext.getDeploymentUnit();
        if (isWebServiceDeployment(unit)) {
            ensureAspectInitialized();
            final Deployment dep = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_KEY);
            if (aspect.canHandle(dep)) {
                ROOT_LOGGER.aspectStart(aspect, unit.getName());
                ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
                final List<SetupAction> setupActions = unit.getAttachmentList(org.jboss.as.ee.component.Attachments.EE_SETUP_ACTIONS);
                try {
                    SecurityActions.setContextClassLoader(aspect.getLoader());
                    dep.addAttachment(ServiceTarget.class, phaseContext.getServiceTarget());
                    for (final SetupAction action : setupActions) {
                        action.setup(null);
                    }
                    aspect.start(dep);
                    dep.removeAttachment(ServiceTarget.class);
                } finally {
                    for (final SetupAction action : setupActions) {
                        action.teardown(null);
                    }
                    SecurityActions.setContextClassLoader(origClassLoader);
View Full Code Here

    }

    @Override
    public void undeploy(final DeploymentUnit unit) {
        if (isWebServiceDeployment(unit)) {
            final Deployment dep = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_KEY);
            if (aspect.canHandle(dep)) {
                ROOT_LOGGER.aspectStop(aspect, unit.getName());
                ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
                try {
                    SecurityActions.setContextClassLoader(aspect.getLoader());
View Full Code Here

            pclWebAppControllerValue.getValue().decrementUsers();
        }
    }

    private boolean hasWebservicesMD(final Endpoint endpoint) {
        final Deployment dep = endpoint.getService().getDeployment();
        return dep.getAttachment(WebservicesMetaData.class) != null;
    }
View Full Code Here

      return spiProvider.getSPI(LifecycleHandlerFactory.class).newLifecycleHandler();
   }

   private InvocationHandler getInvocationHandler(Endpoint ep)
   {
      Deployment dep = ep.getService().getDeployment();
      DeploymentType depType = dep.getType();
     
      String key = depType.toString();

      // Use a special key for MDB endpoints
      EJBArchiveMetaData uapp = dep.getAttachment(EJBArchiveMetaData.class);
      if (uapp != null)
      {
         EJBMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
         if (depType == DeploymentType.JAXRPC_EJB21 && bmd instanceof MDBMetaData)
         {
View Full Code Here

      if (generateWsdl)
         messageStream.println("Generating WSDL:");

      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      DeploymentModelFactory factory = spiProvider.getSPI(DeploymentModelFactory.class);
      Deployment dep = factory.newDeployment("wsprovide-deployment", loader);
      dep.setRuntimeClassLoader(loader);

      builder.buildWebServiceMetaData(dep, umd, endpointClass, null);
      try
      {
         generator.write();
View Full Code Here

                } catch (Exception e) {
                    throw new DeploymentUnitProcessingException(e);
                }
            }
            log.debug(this.aspect + " start: " + unit.getName());
            final Deployment dep = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_KEY);
            dep.addAttachment(DeploymentPhaseContext.class, phaseContext);
            aspect.start(dep);
            dep.removeAttachment(DeploymentPhaseContext.class);
        }
    }
View Full Code Here

    @Override
    public void internalUndeploy(org.jboss.as.server.deployment.DeploymentUnit context) {
        if (ASHelper.isWebServiceDeployment(context)) {
            log.debug(this.aspect + " stop: " + context.getName());
            final Deployment dep = ASHelper.getRequiredAttachment(context, WSAttachmentKeys.DEPLOYMENT_KEY);
            aspect.stop(dep);
        }
    }
View Full Code Here

     * @param endpoint EJB webservice endpoint
     * @return EJB security meta data or null
     */
    private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint) {
        final String ejbName = endpoint.getShortName();
        final Deployment dep = endpoint.getService().getDeployment();
        final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
        final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;

        return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
    }
View Full Code Here

TOP

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

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.