@Override public void stop(final Deployment dep) { final BusHolder holder = dep.removeAttachment(BusHolder.class); if (holder != null) { holder.close(); WSDLFilePublisher wsdlFilePublisher = dep.getAttachment(WSDLFilePublisher.class); if (wsdlFilePublisher != null) { wsdlFilePublisher.unpublishWsdlFiles(); } } }
/** * 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); } }
@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); WSLogger.ROOT_LOGGER.tracef("%s start: %s", aspect, unit.getName()); ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged(); try { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(aspect.getLoader()); dep.addAttachment(ServiceTarget.class, phaseContext.getServiceTarget()); aspect.start(dep); dep.removeAttachment(ServiceTarget.class); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader); } } }
/** * 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); } }
@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); WSLogger.ROOT_LOGGER.tracef("%s start: %s", aspect, unit.getName()); ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged(); try { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(aspect.getLoader()); dep.addAttachment(ServiceTarget.class, phaseContext.getServiceTarget()); aspect.start(dep); dep.removeAttachment(ServiceTarget.class); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader); } } }
@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(); try { SecurityActions.setContextClassLoader(aspect.getLoader()); dep.addAttachment(ServiceTarget.class, phaseContext.getServiceTarget()); aspect.start(dep); dep.removeAttachment(ServiceTarget.class); } finally { SecurityActions.setContextClassLoader(origClassLoader); } } } }
dep.removeAttachment(ServiceTarget.class);