Search in sources :

Example 1 with DeploymentAspectManager

use of org.jboss.wsf.spi.deployment.DeploymentAspectManager in project wildfly by wildfly.

the class EndpointPublisherImpl method doDeploy.

/**
 * Triggers the WS deployment aspects, which process the deployment and
 * install the endpoint services.
 *
 * @param target
 * @param unit
 */
protected void doDeploy(ServiceTarget target, DeploymentUnit unit) {
    List<DeploymentAspect> aspects = getDeploymentAspects();
    ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
    Deployment dep = null;
    try {
        WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
        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);
        }
        WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader);
    }
}
Also used : AbstractDeploymentAspect(org.jboss.ws.common.integration.AbstractDeploymentAspect) EndpointServiceDeploymentAspect(org.jboss.as.webservices.deployers.EndpointServiceDeploymentAspect) DeploymentAspect(org.jboss.wsf.spi.deployment.DeploymentAspect) EndpointHandlerDeploymentAspect(org.jboss.ws.common.deployment.EndpointHandlerDeploymentAspect) DeploymentAspectManager(org.jboss.wsf.spi.deployment.DeploymentAspectManager) Deployment(org.jboss.wsf.spi.deployment.Deployment) DeploymentAspectManagerImpl(org.jboss.ws.common.deployment.DeploymentAspectManagerImpl)

Example 2 with DeploymentAspectManager

use of org.jboss.wsf.spi.deployment.DeploymentAspectManager in project wildfly by wildfly.

the class EndpointPublisherImpl method undeploy.

protected void undeploy(Deployment deployment) throws Exception {
    List<DeploymentAspect> aspects = getDeploymentAspects();
    ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
    try {
        WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
        DeploymentAspectManager dam = new DeploymentAspectManagerImpl();
        dam.setDeploymentAspects(aspects);
        dam.undeploy(deployment);
    } finally {
        WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader);
    }
}
Also used : AbstractDeploymentAspect(org.jboss.ws.common.integration.AbstractDeploymentAspect) EndpointServiceDeploymentAspect(org.jboss.as.webservices.deployers.EndpointServiceDeploymentAspect) DeploymentAspect(org.jboss.wsf.spi.deployment.DeploymentAspect) EndpointHandlerDeploymentAspect(org.jboss.ws.common.deployment.EndpointHandlerDeploymentAspect) DeploymentAspectManager(org.jboss.wsf.spi.deployment.DeploymentAspectManager) DeploymentAspectManagerImpl(org.jboss.ws.common.deployment.DeploymentAspectManagerImpl)

Aggregations

EndpointServiceDeploymentAspect (org.jboss.as.webservices.deployers.EndpointServiceDeploymentAspect)2 DeploymentAspectManagerImpl (org.jboss.ws.common.deployment.DeploymentAspectManagerImpl)2 EndpointHandlerDeploymentAspect (org.jboss.ws.common.deployment.EndpointHandlerDeploymentAspect)2 AbstractDeploymentAspect (org.jboss.ws.common.integration.AbstractDeploymentAspect)2 DeploymentAspect (org.jboss.wsf.spi.deployment.DeploymentAspect)2 DeploymentAspectManager (org.jboss.wsf.spi.deployment.DeploymentAspectManager)2 Deployment (org.jboss.wsf.spi.deployment.Deployment)1