@Deprecated public void deploy(Deployment deployment) throws org.jboss.deployers.spi.DeploymentException { delegate.deploy(deployment); }
@Deprecated public void undeploy(Deployment deployment) throws org.jboss.deployers.spi.DeploymentException { delegate.undeploy(deployment); }
/** * Describe <code>redeploy</code> method here. * * @param url an <code>URL</code> value * @exception DeploymentException if an error occurs * @jmx.managed-operation */ public void redeploy(URL url) throws DeploymentException { String deploymentName = contextMap.get(url); if (deploymentName != null) { try { Deployment deployment = delegate.getDeployment(deploymentName); delegate.addDeployment(deployment); delegate.process(); delegate.checkComplete(deployment); } catch (org.jboss.deployers.spi.DeploymentException e) { throw new DeploymentException(e); } } else { deploy(url); } }
delegate.addDeployment(deployment); delegate.process(); delegate.checkComplete(deployment);
/** * The <code>getDeployment</code> method returns the Deployment * object for the URL supplied. * * @param url an <code>URL</code> value * @return a <code>Deployment</code> value * @jmx.managed-operation */ public Deployment getDeployment(URL url) { String name = contextMap.get(url); if (name == null) return null; Deployment dc = delegate.getDeployment(name); log.debug("getDeployment, url="+url+", dc="+dc); return dc; }
/** Check the current deployment states and generate a IncompleteDeploymentException * if there are mbeans waiting for depedencies. * @exception IncompleteDeploymentException * @jmx.managed-operation */ public void checkIncompleteDeployments() throws DeploymentException { try { delegate.checkComplete(); } catch (Exception e) { throw new DeploymentException("Deployments are incomplete", e); } }
public void destroy(Deployment dep) { URL warURL = (URL)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_URL); if (warURL == null) { log.error("Cannot obtain generated webapp URL"); return; } log.debug("destroyServiceEndpoint: " + warURL); try { org.jboss.deployers.client.spi.Deployment deployment = deploymentMap.get(warURL.toExternalForm()); if (deployment != null) { mainDeployer.undeploy(deployment); deploymentMap.remove(warURL.toExternalForm()); } } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void create(Deployment dep, URL webAppURL) { if (webAppURL == null) throw new IllegalArgumentException("Web meta data URL cannot be null"); log.debug("publishServiceEndpoint: " + webAppURL); try { webXMLRewriter.rewriteWebXml(dep); dep.setProperty(HttpSpec.PROPERTY_WEBAPP_URL, webAppURL); org.jboss.deployers.client.spi.Deployment deployment = createDeploymentContext(webAppURL); // Mark the deployment as generated web app so the JSE deployer hook can ignore it MutableAttachments attach = (MutableAttachments)deployment.getPredeterminedManagedObjects(); attach.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE); mainDeployer.deploy(deployment); deploymentMap.put(webAppURL.toExternalForm(), deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void undeploy(ServiceEndpointReference ref, ServerConfig serverConfig) throws Exception { getMainDeployer().undeploy(ref.getDeploymentName()); }
this.mainDeployer.deploy(deployment); this.deployments.put(contextRoot, deployment);
/** * Destroys dynamically published JAXWS endpoint on the JBoss server. * * @param context to be destroyed * @param endpoint to be unpublished */ public synchronized void destroy(final HttpContext context, final Endpoint endpoint) { try { final String contextRoot = context.getContextRoot(); final Deployment deployment = this.deployments.remove(contextRoot); if (deployment != null) { this.mainDeployer.undeploy(deployment); } } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public ServiceEndpointReference deploy(EndpointMetaData metaData, Class<?> providerImpl, URL serviceUrl, final ClassLoader classLoader, File warArchive, ServerConfig serverConfig) throws Exception { Deployment deployment = createVFSDeployment(warArchive); // Classloading ClassLoaderFactory clf = new DelegatingClassLoaderFactory(classLoader); // WebMetaData String[] webContext = deriveWebContextFromServiceUrl(serviceUrl); WebMetaDataFactory wmdFactory = new WebMetaDataFactory( metaData.getEndpointId(), webContext[0], webContext[1], providerImpl.getName() ); MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects(); // Applies to in memory only. Not used with VFS underneath //mutableAttachments.addAttachment(StructureMetaData.class, new StructureMetaDataImpl()); mutableAttachments.addAttachment(ClassLoaderFactory.class, clf); mutableAttachments.addAttachment(JBossWebMetaData.class, wmdFactory.createWebMetaData(classLoader)); mutableAttachments.addAttachment(DeploymentUnitFilter.class, new RiftsawWSDeploymentUnitFilter()); getMainDeployer().deploy(deployment); ServiceEndpointReference ref = new ServiceEndpointReference( metaData.getEndpointId(), serviceUrl, deployment.getName(), warArchive.getAbsolutePath() ); //ref.setArchiveLocation(warArchive.getAbsolutePath()); return(ref); }
private void undeploy(Deployment dep) { try { AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); mainDeployer.undeploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void create(Deployment dep) { JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class); if (jbwmd == null) throw new WebServiceException("Cannot find web meta data"); try { webMetaDataModifier.modifyMetaData(dep); AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects(); mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE); mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory()); mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd); mainDeployer.deploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void destroy(Deployment dep) { try { AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); mainDeployer.undeploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
private void deploy(Deployment dep) { JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class); if (jbwmd == null) throw new WebServiceException("Cannot find web meta data"); try { webMetaDataModifier.modifyMetaData(dep); final AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects(); mutableAttachments.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE); mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory()); mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd); mainDeployer.deploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void destroy(Deployment dep) { try { AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); mainDeployer.undeploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void create(Deployment dep) { JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class); if (jbwmd == null) throw new WebServiceException("Cannot find web meta data"); try { webMetaDataModifier.modifyMetaData(dep); AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects(); mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE); mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory()); mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd); mainDeployer.deploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void destroy(Deployment dep) { try { AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); mainDeployer.undeploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }
public void create(Deployment dep) { JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class); if (jbwmd == null) throw new WebServiceException("Cannot find web meta data"); try { webMetaDataModifier.modifyMetaData(dep); AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot()); MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects(); mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE); mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory()); mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd); mainDeployer.deploy(deployment); } catch (Exception ex) { WSFDeploymentException.rethrow(ex); } }