Search in sources :

Example 1 with FileIntIDFactory

use of com.helger.commons.id.factory.FileIntIDFactory 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");
}
Also used : FileIntIDFactory(com.helger.commons.id.factory.FileIntIDFactory) JettyRunner(com.helger.photon.jetty.JettyRunner) File(java.io.File) AS4ResourceHelper(com.helger.phase4.util.AS4ResourceHelper) BeforeClass(org.junit.BeforeClass)

Aggregations

FileIntIDFactory (com.helger.commons.id.factory.FileIntIDFactory)1 AS4ResourceHelper (com.helger.phase4.util.AS4ResourceHelper)1 JettyRunner (com.helger.photon.jetty.JettyRunner)1 File (java.io.File)1 BeforeClass (org.junit.BeforeClass)1