Skip to content

Instantly share code, notes, and snippets.

@walderrama
Created February 29, 2016 15:19
Show Gist options
  • Save walderrama/ad2d0a43bb661a7793e1 to your computer and use it in GitHub Desktop.
Save walderrama/ad2d0a43bb661a7793e1 to your computer and use it in GitHub Desktop.
jboss jmx enabled conf
## -*- shell-script -*- ######################################################
## ##
## JBoss Bootstrap Script Configuration ##
## ##
##############################################################################
#
# This file is optional; it may be removed if not needed.
#
#
# Specify the maximum file descriptor limit, use "max" or "maximum" to use
# the default, as queried by the system.
#
# Defaults to "maximum"
#
#MAX_FD="maximum"
#
# Specify the profiler configuration file to load.
#
# Default is to not load profiler configuration file.
#
#PROFILER=""
#
# Specify the location of the Java home directory. If set then $JAVA will
# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
#
#JAVA_HOME="/opt/java/jdk"
#
# Specify the exact Java VM executable to use.
#
#JAVA=""
if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman"
fi
# Uncomment the following line to prevent manipulation of JVM options
# by shell scripts.
#
#PRESERVE_JAVA_OPTS=true
#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS,org.jboss.logmanager -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi
# Sample JPDA settings for remote socket debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
# Sample JPDA settings for shared memory debugging
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
# Uncomment to not use JBoss Modules lockless mode
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false"
# Uncomment to gather JBoss Modules metrics
#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true"
# Enable remote JMX access
JAVA_OPTS="${JAVA_OPTS} -Djava.rmi.server.hostname=192.168.40.230"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote=true"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=1190"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
# Required to fix "JBAS014670: Failed initializing module org.jboss.as.logging" JBoss startup error
JBOSS_HOME="/opt/jboss-as-7.1.1.Final/"
JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_OPTS="${JAVA_OPTS} -Xbootclasspath/p:${JBOSS_HOME}/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar"
JAVA_OPTS="${JAVA_OPTS} -Xbootclasspath/p:${JBOSS_HOME}/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar"
JAVA_OPTS="${JAVA_OPTS} -Xbootclasspath/p:${JBOSS_HOME}/modules/org/apache/log4j/main/log4j-1.2.16.jar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment