diff options
-rw-r--r-- | plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java index b23428d58b..e0531b13fa 100644 --- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/HibernateTest.java @@ -54,17 +54,7 @@ public class HibernateTest public static void main(String[] args) throws Exception { - // Turn on tracing - OMPlatform.INSTANCE.setDebugging(true); - OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE); - OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE); - - // Prepare the standalone infra structure (not needed when running inside Eclipse) - IManagedContainer container = ContainerUtil.createContainer(); // Create a wiring container - Net4jUtil.prepareContainer(container); // Prepare the Net4j kernel - JVMUtil.prepareContainer(container); // Prepare the JVM transport - CDOServerUtil.prepareContainer(container); // Prepare the CDO server - CDOUtil.prepareContainer(container, false); // Prepare the CDO client + IManagedContainer container = initContainer(); // Start the transport and create a repository JVMUtil.getAcceptor(container, "default"); // Start the JVM transport @@ -86,6 +76,22 @@ public class HibernateTest connector.disconnect(); } + private static IManagedContainer initContainer() + { + // Turn on tracing + OMPlatform.INSTANCE.setDebugging(true); + OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE); + OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE); + + // Prepare the standalone infra structure (not needed when running inside Eclipse) + IManagedContainer container = ContainerUtil.createContainer(); // Create a wiring container + Net4jUtil.prepareContainer(container); // Prepare the Net4j kernel + JVMUtil.prepareContainer(container); // Prepare the JVM transport + CDOServerUtil.prepareContainer(container); // Prepare the CDO server + CDOUtil.prepareContainer(container, false); // Prepare the CDO client + return container; + } + private static IRepository createRepository() throws Exception { Map<String, String> props = new HashMap<String, String>(); |