1.4.2. Advanced Customization

For Tomcat, advanced customization is performed by appending parameters to the CATALINA_OPTS variable, for example:

ParameterDescription

-XX:+HeapDumpOnOutOfMemoryError

-XX:HeapDumpPath=\"${CATALINA_HOME}/logs/\"

By appending -XX:+HeapDumpOnOutOfMemoryError to CATALINA_OPTS, you will have a dump file which is usable to analyze why JVM runs out of memory.

The dump file's path is given in the second line.

-XX:+PrintGCDetails

-Xloggc:\"${CATALINA_HOME}/logs/gc.log\"

The first line enables the GC (JVM Garbage Collector) log. The second line indicates where you want to save the log file.

-Dcom.sun.management.jmxremote=true

-Dcom.sun.management.jmxremote.ssl=false

-Dcom.sun.management.jmxremote.password.file=\"${CATALINA_HOME}/conf/jmxremote.password\"

-Dcom.sun.management.jmxremote.access.file=\"${CATALINA_HOME}/conf/jmxremote.access\"

-Djava.rmi.server.hostname=localhost

By appending those parameters to CATALINA_OPTS, you allow a JMX client (such as jconsole, visualvm) to connect to your JVM and to do operation tasks.

This tutorial describes how to connect jconsole to a Java application.

-DJDBCWorkspaceDataContainer.statistics.enabled=true -DJCRStatisticsManager.persistence.timeout=30000

This line activates the JCR Statistics tool which is used for performance analysis and tuning.

-Dcrash.telnet.port=12345

-Dcrash.ssh.port=54321

These 2 variables take effect only if you are deploying Crash into eXo Platform.

Crash is a useful tool which provides a shell to work on the JCR repository. By default, you can connect to the shell at telnet port 5000 and ssh port 2000.

For JBoss, similar variables can be customized by appending JAVA_OPTS, for example:

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus