server/src/main/java/com/orientechnologies/orient/server/OServerShutdownHook.java
@Override
  public void run() {
    if (server != null)
      if (!server.shutdown()) {
        // ALREADY IN SHUTDOWN, WAIT FOR 5 SEC MORE
        try {
          Thread.sleep(5000);
        } catch (InterruptedException e) {
        }
      }
  }
@Override
  public void run() {
    if (server != null)
      if (!server.shutdown()) {
        // ALREADY IN SHUTDOWN, WAIT FOR 5 SEC MORE
        try {
          Thread.sleep(5000);
        } catch (InterruptedException e) {
        }
      }
  }
@ Override public void run ( ) { if ( server != null ) if ( ! server . shutdown ( ) ) { // ALREADY IN SHUTDOWN, WAIT FOR 5 SEC MORE
 try { Thread . sleep ( 5000 ) ; } catch ( InterruptedException e ) { } } }
Catch the JVM exit and assure to shutdown the Orient Server.
Catch the JVM exit and assure to shutdown the Orient Server .