Showing posts from March, 2013

ActiveMQ remote JMX

With ActiveMQ 5.3.2 at least, you can't connect remotely to JMX unless the hostname in /etc/hosts maps to the routable IP and not localhost

ActiveMQ Java 7 JAVA_HOME

Executing the stock ActiveMQ 5.3.2 startup script with java 7 complains about JAVA_HOME

Turns out the error was related to .activemqrc that was created when I tested with ActiveMQ 5.8.0. The JAVACMD is set to "auto" in that file part way through the 5.3.2 activemq startup script.

apache-activemq-5.3.2/bin$ activemq
Error: JAVA_HOME is not defined correctly.
  We cannot execute auto

Java home was set correctly:$ echo $JAVA_HOME /home/myusername/java/jdk1.7.0_15

Needed to edit the script and add the following right before "if [ -z "$JAVACMD" ] ; then"
This clears the mysterious setting to auto, echoing it returned a blank line:$ echo $JAVACMD$

ConcurrentHashMap misuse

Default constructor creates 16 segments which can consume excessive memory if lots of small Maps are constructed. Set the concurrency to 1 unless high contention is expected.