/** * 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); } }
/** * 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 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(); }
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(); }
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(); }
/** * 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); } }