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);
}
}
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);
}
}
Aggregations