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 ) ; } }
Triggers the WS deployment aspects which process the deployment and install the endpoint services .