Author: ivol37 at gmail.com
Date: Mon Jan 17 15:50:20 2011
New Revision: 666

Log:
[AMDATU-272] Added JMX configuration options

Modified:
   trunk/pom.xml
   trunk/src/main/resources/shell/run.sh
   trunk/src/main/resources/shell/startup.bat

Modified: trunk/pom.xml
==============================================================================
--- trunk/pom.xml       (original)
+++ trunk/pom.xml       Mon Jan 17 15:50:20 2011
@@ -73,6 +73,11 @@
     <!-- The RPC port for Thrift communication -->
     <cassandra.rpc_port>9160</cassandra.rpc_port>
 
+    <!-- JMX configuration -->
+    <jmxremote.port></jmxremote.port>
+    <jmxremote.ssl>false</jmxremote.ssl>
+    <jmxremote.authenticate>false</jmxremote.authenticate>
+
     <!--
       Version numbers of dependent libraries
     -->

Modified: trunk/src/main/resources/shell/run.sh
==============================================================================
--- trunk/src/main/resources/shell/run.sh       (original)
+++ trunk/src/main/resources/shell/run.sh       Mon Jan 17 15:50:20 2011
@@ -12,5 +12,10 @@
 # Set encoding to UTF-8
 JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=utf-8"
 
+# JMX remoting options
+if [ "${jmxremote.port}" != "" ]; then
+  JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=${jmxremote.port} 
-Dcom.sun.management.jmxremote.ssl=${jmxremote.ssl} 
-Dcom.sun.management.jmxremote.authenticate=${jmxremote.authenticate}"
+fi
+
 # Run the platform...
 java $JAVA_OPTS -jar amdatu-system/org.apache.felix.main-2.0.5.jar

Modified: trunk/src/main/resources/shell/startup.bat
==============================================================================
--- trunk/src/main/resources/shell/startup.bat  (original)
+++ trunk/src/main/resources/shell/startup.bat  Mon Jan 17 15:50:20 2011
@@ -1,3 +1,5 @@
+ at echo off
+
 rem Open a debug port
 set JAVA_OPTS=-Xdebug 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
 
@@ -10,5 +12,15 @@
 rem Set encoding to UTF-8
 set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=utf-8
 
+IF NOT "${jmxremote.port}" == "" (
+  set JAVA_OPTS=%JAVA_OPTS%^
+    -Dcom.sun.management.jmxremote.port=${jmxremote.port}^
+    -Dcom.sun.management.jmxremote.ssl=${jmxremote.ssl}^
+    -Dcom.sun.management.jmxremote.authenticate=${jmxremote.authenticate}
+)
+
+echo Starting Amdatu server
+echo JAVA_OPTS=%JAVA_OPTS%
+
 java %JAVA_OPTS% -jar amdatu-system/org.apache.felix.main-2.0.5.jar
 

Reply via email to