protected BasicXMLDeployer createDeployer() { return new BasicXMLDeployer(kernel, defaultMode); }
/** * Deploy a url * * @param url the deployment url * @throws Throwable for any error */ protected void deploy(URL url) throws Throwable { deployer.deploy(url); }
protected void undeploy(URL url) { try { deployer.undeploy(url); } catch (Throwable t) { } } }
/** * Undeploy all */ protected void undeploy() { log.debug("Undeploying " + deployer.getDeploymentNames()); deployer.shutdown(); } }
public void bootstrap() throws Throwable { super.bootstrap(); deployer = new BasicXMLDeployer(getKernel()); //Deploy the server side components ClassLoader cl = Thread.currentThread().getContextClassLoader(); for (Enumeration e = cl.getResources("META-INF/openmobster-config.xml"); e.hasMoreElements(); ) { URL url = (URL) e.nextElement(); deploy(url); } // Validate that everything is ok deployer.validate(); }
/** * Deploy MC beans from URL */ public void deploy(URL url) { log.debug("deploy: " + url); // Deploy the beans try { deployer.deploy(url); deployer.validate(); // The KernelLocator is expected to get deployed as a bean if (KernelLocator.getKernel() == null) throw new BPMException("KernelLocator not deployed as MC bean"); } catch (Throwable e) { throw new BPMException("Cannot deploy beans from: " + url, e); } }
/** * Validate * * @throws Exception for any error */ protected void validate() throws Exception { try { deployer.validate(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw e; } catch (Error e) { throw e; } catch (Throwable t) { throw new RuntimeException(t); } }
public synchronized void shutdown() { deployer.shutdown(); }
public void bootstrap() throws Throwable { super.bootstrap(); deployer = new BasicXMLDeployer(getKernel()); //Deploy the server side components ClassLoader cl = Thread.currentThread().getContextClassLoader(); for (Enumeration e = cl.getResources("META-INF/console-beans.xml"); e.hasMoreElements(); ) { URL url = (URL) e.nextElement(); deploy(url); } // Validate that everything is ok deployer.validate(); }
/** * Validate * * @throws Exception for any error */ private static void validate() throws Exception { try { deployer.validate(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw e; } catch (Error e) { throw e; } catch (Throwable t) { throw new RuntimeException(t); } }
public synchronized void shutdown() { deployer.shutdown(); }
public void bootstrap() throws Throwable { super.bootstrap(); deployer = new BasicXMLDeployer(getKernel()); Runtime.getRuntime().addShutdownHook(new Shutdown()); ClassLoader cl = Thread.currentThread().getContextClassLoader(); for (Enumeration<URL> e = cl.getResources(StandaloneKernelConstants.DEPLOYMENT_XML_NAME); e.hasMoreElements(); ) { URL url = e.nextElement(); deploy(url); } for (Enumeration<URL> e = cl.getResources("META-INF/" + StandaloneKernelConstants.DEPLOYMENT_XML_NAME); e.hasMoreElements(); ) { URL url = e.nextElement(); deploy(url); } // Validate that everything is ok deployer.validate(); }
protected void undeploy(URL url) { try { deployer.undeploy(url); } catch (Throwable t) { } } //----------------------------------------------------------------------------------------------------------
protected void deploy(URL url) throws Throwable { deployer.deploy(url); }
private static BasicXMLDeployer createDeployer() { return new BasicXMLDeployer(kernel, ControllerMode.AUTOMATIC); }
public void run() { log.info("Shutting down"); deployer.shutdown(); } }
/** * Undeploy a url * * @param url the deployment url */ protected void undeploy(URL url) { try { deployer.undeploy(url); } catch (Throwable t) { log.warn("Error during undeployment: " + url, t); } }
protected void deploy(URL url) throws Throwable { deployer.deploy(url); }
public EmbeddedBeansDeployer() { // Get or bootstrap the kernel kernel = KernelLocator.getKernel(); if (kernel == null) { try { super.bootstrap(); kernel = super.getKernel(); log.debug("bootstrap kernel: " + kernel); } catch (Throwable e) { throw new BPMException("Cannot bootstrap kernel", e); } } deployer = new BasicXMLDeployer(kernel); }
/** * Undeploy a url * * @param url the url to undeploy * @throws IllegalStateException if the url is unknown */ public void undeploy(final URL url) { if (url == null) throw new IllegalArgumentException("Null url"); undeploy(url.toString()); }