Source:
private void init() throws Exception { String database = connectionConfig.getDatabase(); logger.info(String.format("Initialize Embedded OrientDB server for [%s]", database)); server = OServerMain.create(); serverConfiguration = new OServerConfiguration(); OServerHookConfiguration hookConfiguration = new OServerHookConfiguration(); serverConfiguration.hooks = Arrays.asList(new OServerHookConfiguration[] { hookConfiguration }); hookConfiguration.clazz = GenericEntityHook.class.getName(); OServerNetworkListenerConfiguration binaryListener = new OServerNetworkListenerConfiguration(); binaryListener.ipAddress = connectionConfig.getHost(); binaryListener.portRange = connectionConfig.getPort().toString(); binaryListener.protocol = "binary"; binaryListener.socket = "default"; OServerNetworkProtocolConfiguration binaryProtocol = new OServerNetworkProtocolConfiguration(); binaryProtocol.name = "binary"; binaryProtocol.implementation = "com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary"; OServerNetworkConfiguration networkConfiguration = new OServerNetworkConfiguration(); networkConfiguration.protocols = new LinkedList<>(); networkConfiguration.protocols.add(binaryProtocol); networkConfiguration.listeners = new LinkedList<>(); networkConfiguration.listeners.add(binaryListener); List<OServerUserConfiguration> users = new LinkedList<>(); users.add(buildUser(connectionConfig.getUsername(), connectionConfig.getPassword(), "*")); System.setProperty("ORIENTDB_ROOT_PASSWORD", connectionConfig.getUsername()); List<OServerEntryConfiguration> properties = new LinkedList<>(); properties.add(buildProperty("server.database.path", getDatabasePath())); properties.add(buildProperty("plugin.dynamic", "false")); properties.add(buildProperty("log.console.level", "linfo")); properties.add(buildProperty("orientdb.www.path", getStudioPath())); serverConfiguration.network = networkConfiguration; serverConfiguration.users = users.toArray(new OServerUserConfiguration[users.size()]); serverConfiguration.properties = properties.toArray(new OServerEntryConfiguration[properties.size()]); }

Target:
private void init() throws Exception { String database = connectionConfig.getDatabase(); logger.info(String.format("Initialize Embedded OrientDB server for [%s]", database)); server = OServerMain.create(); serverConfiguration = new OServerConfiguration(); OServerHookConfiguration hookConfiguration = new OServerHookConfiguration(); serverConfiguration.hooks = Arrays.asList(new OServerHookConfiguration[] { hookConfiguration }); hookConfiguration.clazz = GenericEntityHook.class.getName(); OServerNetworkListenerConfiguration binaryListener = new OServerNetworkListenerConfiguration(); binaryListener.ipAddress = connectionConfig.getHost(); binaryListener.portRange = connectionConfig.getPort().toString(); binaryListener.protocol = "binary"; binaryListener.socket = "default"; OServerNetworkProtocolConfiguration binaryProtocol = new OServerNetworkProtocolConfiguration(); binaryProtocol.name = "binary"; binaryProtocol.implementation = "com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary"; OServerNetworkConfiguration networkConfiguration = new OServerNetworkConfiguration(); networkConfiguration.protocols = new LinkedList<>(); networkConfiguration.protocols.add(binaryProtocol); networkConfiguration.listeners = new LinkedList<>(); networkConfiguration.listeners.add(binaryListener); List<OServerUserConfiguration> users = new LinkedList<>(); users.add(buildUser(connectionConfig.getUsername(), connectionConfig.getPassword(), "*")); System.setProperty("ORIENTDB_ROOT_PASSWORD", connectionConfig.getUsername()); List<OServerEntryConfiguration> properties = new LinkedList<>(); properties.add(buildProperty("server.database.path", getDatabasePath())); properties.add(buildProperty("plugin.dynamic", "false")); properties.add(buildProperty("log.console.level", "info")); properties.add(buildProperty("orientdb.www.path", getStudioPath())); serverConfiguration.network = networkConfiguration; serverConfiguration.users = users.toArray(new OServerUserConfiguration[users.size()]); serverConfiguration.properties = properties.toArray(new OServerEntryConfiguration[properties.size()]); }