public void undeploy() { try { testContainer.stopContainer(); } catch (Exception e) { log.log(Level.SEVERE, "Could not shut down container", e); } testContainer = null; deploymentException = null; }
public void undeploy() { try { testContainer.stopContainer(); } catch (Exception e) { log.log(Level.SEVERE, "Could not shut down container", e); } testContainer = null; deploymentException = null; }
public void undeploy(Context context, Archive<?> archive) throws DeploymentException { TestContainer container = context.get(TestContainer.class); if(container != null) { container.stopContainer(); } ContextClassLoaderManager classLoaderManager = context.get(ContextClassLoaderManager.class); classLoaderManager.disable(); }
public void undeploy(Archive<?> archive) throws DeploymentException { TestContainer container = testContainerProducer.get(); if(container != null) { container.stopContainer(); } ContextClassLoaderManager classLoaderManager = contextClassLoaderManagerProducer.get(); classLoaderManager.disable(); }
/** * Bootstrap and shutdown the container. * * @param runnable a {@link Runnable} to be called whilst the container is * active * */ public void run(Runnable runnable) throws Exception { TestContainer container = null; try { container = new TestContainer(beansXml, classes); container.startContainer().ensureRequestActive(); runnable.run(container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next())); } finally { if (container != null) { container.stopContainer(); } } }
/** * Bootstrap and shutdown the container. * * @param runnable a {@link Runnable} to be called whilst the container is * active * */ public void run(Runnable runnable) throws Exception { TestContainer container = null; try { container = new TestContainer(beansXml, classes); container.startContainer().ensureRequestActive(); runnable.run(container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next())); } finally { if (container != null) { container.stopContainer(); } } }