Class Main

java.lang.Object
org.eclipse.emf.cdo.server.Main

public final class Main extends Object
Starts the CDO server as a plain Java application. Launch this class as the Java main class with the CDO server runtime and its required bundles on the class path. The server requires a readable regular configuration file.

By default, config/cdo-server.xml is resolved relative to the process working directory. The net4j.config JVM system property selects another configuration directory, and the org.eclipse.emf.cdo.server.configFileName JVM system property selects another filename. Resolution uses OMPlatform.getConfigFile(String). Set these values with -D... JVM options; they are not application arguments. The current main(String[]) does not process its argument array.

After startup, enter stop and press Enter for orderly shutdown. Ctrl+C in a real terminal and SIGTERM in headless environments such as Docker use the JVM shutdown hook for the same cleanup. Eclipse's Terminate action may stop the JVM without running that orderly lifecycle and can cause a DB store recovery cycle on the next start.

Example, using the default filename in a selected configuration directory:

java -Dnet4j.config=/etc/cdo -cp "<CDO server runtime class path>" org.eclipse.emf.cdo.server.Main
Since:
4.27
Author:
Eike Stepper
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Starts the standalone CDO server.
      Parameters:
      args - currently ignored; server settings are supplied through JVM system properties and cdo-server.xml
      Throws:
      Exception - if the server cannot be started or the main thread is interrupted while waiting