Package org.jboss.wsf.spi.deployment

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


      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


            ROOT_LOGGER.mBeanServerNotAvailable(processor);
        }
    }

    private boolean hasWebservicesMD(final Endpoint endpoint) {
        final Deployment dep = endpoint.getService().getDeployment();
        return dep.getAttachment(WebservicesMetaData.class) != null;
    }
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

     * Publishes the endpoints declared to the provided WSEndpointDeploymentUnit
     */
    public List<Endpoint> publish(ServiceTarget target, WSEndpointDeploymentUnit unit) throws Exception {
        List<DeploymentAspect> aspects = getDeploymentAspects();
        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);
            // [JBWS-3441] hack - fallback JAXWS invocation handler for dynamically generated deployments
            for (Endpoint ep : dep.getService().getEndpoints()) {
                ep.setState(EndpointState.STOPPED);
                ep.setInvocationHandler(new InvocationHandlerJAXWS());
                ep.setState(EndpointState.STARTED);
            }
        } 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 = getDeploymentAspects();
        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

   }

   private void startEndpoint()
   {
      // Start the endpoint
      Deployment dep = endpoint.getService().getDeployment();
      if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() == DeploymentType.JAXWS_JSE)
      {
         if (endpoint.getState() == EndpointState.CREATED)
            endpoint.getLifecycleHandler().start(endpoint);
      }
   }
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

/*  98 */     startEndpoint();
/*     */   }
/*     */
/*     */   private void startEndpoint()
/*     */   {
/* 104 */     Deployment dep = this.endpoint.getService().getDeployment();
/* 105 */     if ((dep.getType() == Deployment.DeploymentType.JAXRPC_JSE) || (dep.getType() == Deployment.DeploymentType.JAXWS_JSE))
/*     */     {
/* 107 */       if (this.endpoint.getState() == Endpoint.EndpointState.CREATED)
/* 108 */         this.endpoint.getLifecycleHandler().start(this.endpoint);
/*     */     }
/*     */   }
View Full Code Here

/* 100 */     if (this.generateWsdl) {
/* 101 */       this.messageStream.println("Generating WSDL:");
/*     */     }
/* 103 */     SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
/* 104 */     DeploymentModelFactory factory = (DeploymentModelFactory)spiProvider.getSPI(DeploymentModelFactory.class);
/* 105 */     Deployment dep = factory.newDeployment("wsprovide-deployment", loader);
/* 106 */     dep.setRuntimeClassLoader(loader);
/*     */
/* 108 */     builder.buildWebServiceMetaData(dep, umd, endpointClass, null);
/*     */     try
/*     */     {
/* 111 */       generator.write();
View Full Code Here

            ROOT_LOGGER.mBeanServerNotAvailable(processor);
        }
    }

    private boolean hasWebservicesMD(final Endpoint endpoint) {
        final Deployment dep = endpoint.getService().getDeployment();
        return dep.getAttachment(WebservicesMetaData.class) != 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.