public void unload(ExtendedDeploymentContext context) { Logger logger = context.getLogger(); ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(moduleClassLoader); for (EngineRef engine : reversedEngines) { if (engine.getApplicationContainer()!=null && engine.getApplicationContainer().getClassLoader()!=null) { classLoaders.add(engine.getApplicationContainer().getClassLoader()); try { context.setClassLoader(moduleClassLoader); engine.unload(context); } catch(Throwable e) { logger.log(Level.SEVERE, "Failed to unload from container type : " + engine.getContainerInfo().getSniffer().getModuleType(), e); } } } // add the module classloader to the predestroy list if it's not // already there if (classLoaders != null && moduleClassLoader != null) { classLoaders.add(moduleClassLoader); } if (events!=null) { events.send(new Event<ModuleInfo>(Deployment.MODULE_UNLOADED, this), false); } } finally { Thread.currentThread().setContextClassLoader(currentClassLoader); context.setClassLoader(null); } }
public boolean suspend(Logger logger) { boolean isSuccess = true; for (EngineRef engine : reversedEngines) { try { engine.getApplicationContainer().suspend(); } catch(Exception e) { isSuccess = false; logger.log(Level.SEVERE, "Error suspending module " + engine.getContainerInfo().getSniffer().getModuleType(),e ); } } return isSuccess; }
public void unload(ExtendedDeploymentContext context) { Logger logger = context.getLogger(); ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(moduleClassLoader); for (EngineRef engine : _getEngineRefs()) { if (engine.getApplicationContainer()!=null && engine.getApplicationContainer().getClassLoader()!=null) { classLoaders.add(engine.getApplicationContainer().getClassLoader()); try { context.setClassLoader(moduleClassLoader); engine.unload(context); } catch(Throwable e) { logger.log(Level.SEVERE, "Failed to unload from container type : " + engine.getContainerInfo().getSniffer().getModuleType(), e); } } } // add the module classloader to the predestroy list if it's not // already there if (classLoaders != null && moduleClassLoader != null) { classLoaders.add(moduleClassLoader); } if (events!=null) { events.send(new Event<ModuleInfo>(Deployment.MODULE_UNLOADED, this), false); } } finally { Thread.currentThread().setContextClassLoader(currentClassLoader); context.setClassLoader(null); } }
public boolean resume(Logger logger) { boolean isSuccess = true; for (EngineRef module : _getEngineRefs()) { try { module.getApplicationContainer().resume(); } catch(Exception e) { isSuccess = false; logger.log(Level.SEVERE, "Error resuming module " + module.getContainerInfo().getSniffer().getModuleType(),e ); } } return isSuccess; }
public boolean suspend(Logger logger) { boolean isSuccess = true; for (EngineRef engine : _getEngineRefs()) { try { engine.getApplicationContainer().suspend(); } catch(Exception e) { isSuccess = false; logger.log(Level.SEVERE, "Error suspending module " + engine.getContainerInfo().getSniffer().getModuleType(),e ); } } return isSuccess; }
public boolean resume(Logger logger) { boolean isSuccess = true; for (EngineRef module : _getEngineRefs()) { try { module.getApplicationContainer().resume(); } catch(Exception e) { isSuccess = false; logger.log(Level.SEVERE, "Error resuming module " + module.getContainerInfo().getSniffer().getModuleType(),e ); } } return isSuccess; }
logger.log(Level.SEVERE, "Module not started " + engine.getApplicationContainer().toString()); throw new Exception( "Module not started " + engine.getApplicationContainer().toString()); logger.log(Level.SEVERE, "Exception while invoking " + engine.getApplicationContainer().getClass() + " start method", e); throw e;
logger.log(Level.SEVERE, "Module not started " + engine.getApplicationContainer().toString()); throw new Exception( "Module not started " + engine.getApplicationContainer().toString()); logger.log(Level.SEVERE, "Exception while invoking " + engine.getApplicationContainer().getClass() + " start method", e); throw e;