use of com.helger.photon.jetty.JettyRunner in project phoss-smp by phax.
the class MockWebServer method startRegularServer.
/**
* Starts HTTP server exposing JAX-RS resources defined in this application.
*
* @return The Jetty runner
*/
@Nonnull
public static JettyRunner startRegularServer() {
final JettyRunner ret = new JettyRunner();
ret.setContextPath(CONTEXT_PATH).setPort(PORT).setStopPort(STOP_PORT);
try {
ret.startServer();
} catch (final Exception ex) {
throw new IllegalStateException("Failed to start server", ex);
}
return ret;
}
use of com.helger.photon.jetty.JettyRunner in project phase4 by phax.
the class RunInJettyAS4TEST9090 method startNinetyServer.
public static void startNinetyServer() throws Exception {
s_aSC = ScopedConfig.create(new FileSystemResource("src/test/resources/test-phase4-9090.properties"));
final JettyRunner aJetty = new JettyRunner();
aJetty.setPort(PORT).setStopPort(STOP_PORT).setAllowAnnotationBasedConfig(false);
aJetty.startServer();
}
use of com.helger.photon.jetty.JettyRunner in project phase4 by phax.
the class MockJettySetup method startServer.
@BeforeClass
public static void startServer() throws Exception {
LOGGER.info("MockJettySetup - starting");
if (_isRunJetty()) {
final int nPort = _getJettyPort();
s_aJetty = new JettyRunner("AS4 Mock Jetty");
s_aJetty.setPort(nPort).setStopPort(nPort + 1000).setAllowAnnotationBasedConfig(false);
s_aJetty.startServer();
} else {
s_aJetty = null;
WebScopeManager.onGlobalBegin(MockServletContext.create());
final File aSCPath = new File("target/junittest").getAbsoluteFile();
WebFileIO.initPaths(new File(AS4Configuration.getDataPath()).getAbsoluteFile(), aSCPath.getAbsolutePath(), false);
GlobalIDFactory.setPersistentIntIDFactory(new FileIntIDFactory(WebFileIO.getDataIO().getFile("ids.dat")));
}
RequestTrackerSettings.setLongRunningRequestsCheckEnabled(false);
RequestTrackerSettings.setParallelRunningRequestsCheckEnabled(false);
s_aResMgr = new AS4ResourceHelper();
LOGGER.info("MockJettySetup - started");
}
Aggregations