diff --git a/src/main/java/org/polypheny/control/control/ServiceManager.java b/src/main/java/org/polypheny/control/control/ServiceManager.java index 02d37ea..d94328e 100644 --- a/src/main/java/org/polypheny/control/control/ServiceManager.java +++ b/src/main/java/org/polypheny/control/control/ServiceManager.java @@ -169,6 +169,8 @@ public static boolean start( final ClientCommunicationStream clientCommunication String logsDir = configuration.getString( "pcrtl.logsdir" ); String javaExecutable = configuration.getString( "pcrtl.java.executable" ) + (SystemUtils.IS_OS_WINDOWS ? ".exe" : ""); List javaOptions = configuration.getStringList( "pcrtl.java.options" ); + boolean exposeJavaDebug = configuration.getBoolean( "pcrtl.java.debug.expose" ); + List javaDebugOptions = configuration.getStringList( "pcrtl.java.debug.options" ); String javaMaximumHeapSize = configuration.getString( "pcrtl.java.heap" ); String pdbmsJar = configuration.getString( "pcrtl.pdbms.jarfile" ); String pdbmsMainClass = configuration.getString( "pcrtl.pdbms.mainclass" ); @@ -185,6 +187,11 @@ public static boolean start( final ClientCommunicationStream clientCommunication }*/ javaOptionsFull.addFirst( "-Xmx" + javaMaximumHeapSize + "G" ); + // Expose Debug + if ( exposeJavaDebug ) { + javaOptionsFull.addAll( javaDebugOptions ); + } + // Build list of arguments List pdbArguments = new LinkedList<>(); if ( !pdbmsArgs.trim().isEmpty() ) { diff --git a/src/main/resources/reference.conf b/src/main/resources/reference.conf index b5687d0..2649842 100644 --- a/src/main/resources/reference.conf +++ b/src/main/resources/reference.conf @@ -20,14 +20,18 @@ pcrtl { java.executable = ${java.home}${file.separator}bin${file.separator}java java.options = [ + "-Djava.net.preferIPv4Stack=true", + ] + java.heap = 4 + + java.debug.expose = false + java.debug.options = [ "-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n", "-Dcom.sun.management.jmxremote", "-Dcom.sun.management.jmxremote.ssl=false", "-Dcom.sun.management.jmxremote.authenticate=false", "-Dcom.sun.management.jmxremote.port=8001", - "-Djava.net.preferIPv4Stack=true", ] - java.heap = 4 pdbms.pidfile = ${pcrtl.workingdir}${file.separator}polypheny-db.pid pdbms.jarfilename = "polypheny-db.jar" diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 4e21c75..80a8169 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -165,6 +165,15 @@

Settings

+ + Expose Java Debug (JDWP & JMX) + + + + Maximum Java Heap Size (in Gigabyte)