private void failDueToRunning() throws LifecycleException { throw new LifecycleException( "The server is already running! " + "Managed containers do not support connecting to running server instances due to the " + "possible harmful effect of connecting to the wrong server. Please stop server before running or " + "change to another type of container.\n" + "To disable this check and allow Arquillian to connect to a running server, " + "set allowConnectingToRunningServer to true in the container configuration" ); }
public void stop() throws LifecycleException { try { log.info("Stopping Jetty Embedded Server [id:" + server.hashCode() + "]"); server.stop(); } catch (Exception e) { throw new LifecycleException("Could not stop container",e); } }
@Override public void stop() throws LifecycleException { if (wasStarted) { try { stopTomcatEmbedded(); } catch (final org.apache.catalina.LifecycleException e) { throw new LifecycleException("Failed to stop Tomcat", e); } } }
@Override protected void startInternal() throws LifecycleException { try { server.start(); } catch (Throwable e) { throw new LifecycleException("Could not invoke start on: " + server, e); } }
@Override public void start() throws LifecycleException { try { startTomcatEmbedded(); } catch (final Exception e) { throw new LifecycleException("Failed to start embedded Tomcat", e); } }
@Override protected void stopInternal() throws LifecycleException { try { server.stop(); } catch (Throwable e) { throw new LifecycleException("Could not invoke stop on: " + server, e); } } }
@Override public void removeSipConnector(String ipAddress, int port, String transport) throws LifecycleException { try { (sipStandardService).removeSipConnector(ipAddress, port, transport); } catch (Exception e) { throw new LifecycleException("Couldn't remove the sip connector " + ipAddress+":"+port+"/"+transport, e); } }
@Override protected void stopInternal() throws LifecycleException { try { server.stop(); } catch (Throwable e) { throw new LifecycleException("Could not invoke stop on: " + server, e); } } }
public static void assertMinimumJettyVersion(String version, String minimum) throws LifecycleException { if (!VersionUtil.isGreaterThenOrEqual(version,minimum)) { throw new LifecycleException("Incompatible Jetty container version on the classpath: [actual:" + version + "], [minimum:" + minimum + "]"); } } }
@Override public void addSipConnector(SipConnector sipConnector) throws LifecycleException { try { (sipStandardService).addSipConnector(sipConnector); } catch (Exception e) { throw new LifecycleException("Couldn't create the sip connector " + sipConnector, e); } }
@Override public void stop() throws LifecycleException { try { removeFailedUnDeployments(); } catch (Exception e) { throw new LifecycleException("Could not clean up", e); } }
@Override protected void startInternal() throws LifecycleException { try { server.start(); } catch (Throwable e) { throw new LifecycleException("Could not invoke start on: " + server, e); } }
@Override public void uninstallBundle(long bundleId) throws Exception { try { frameworkMBean.uninstallBundle(bundleId); logger.info("Bundle '" + bundleId + " was uninstalled"); } catch (Exception ex) { throw new LifecycleException("Cannot uninstall " + bundleId, ex); } }
@Override public void start() throws LifecycleException { try { startTomcatEmbedded(); } catch (Exception e) { throw new LifecycleException("Bad shit happened", e); } }
public void stop() throws LifecycleException { try { framework.stop(); framework.waitForStop(3000); } catch (RuntimeException rte) { throw rte; } catch (Exception ex) { throw new LifecycleException("Cannot stop embedded OSGi Framework", ex); } }
public void stop() throws LifecycleException { try { unbindCommandRunner(); glassfish.stop(); } catch (Exception e) { throw new LifecycleException("Could not stop GlassFish Embedded", e); } }
@Override public void stop() throws LifecycleException { try { this.container.stop(); } catch (final Exception e) { throw new LifecycleException("Unable to stop server", e); } finally { resetSerialization(); } }
public void start() throws LifecycleException { try { payaraClient.startUp(); } catch (PayaraClientException e) { log.severe(e.getMessage()); throw new LifecycleException(e.getMessage()); } }
public void start() throws LifecycleException { try { glassFishClient.startUp(); } catch (GlassFishClientException e) { log.severe(e.getMessage()); throw new LifecycleException(e.getMessage()); } }
@Override public void start() throws LifecycleException { try { this.container.start(); SystemInstance.get().setComponent(AdditionalBeanDiscoverer.class, new TestClassDiscoverer()); // this property is not mandatory by default but depending the protocol it can be relevant so adding it by default SystemInstance.get().setProperty("org.apache.openejb.servlet.filters", ArquillianFilterRunner.class.getName() + "=/ArquillianServletRunner"); } catch (final Exception e) { throw new LifecycleException("Something went wrong", e); } }