Posts

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 127.0.0.1 http://kyrill007.livejournal.com/3517.html

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: ...java/apache-activemq-5.3.2/bin$ 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" JAVACMD= This clears the mysterious setting to auto, echoing it returned a blank line: ...java/apache-activemq-5.3.2/bin$ echo $JAVACMD ...java/apache-activemq-5.3.2/bin$

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. http://ria101.wordpress.com/2011/12/12/concurrenthashmap-avoid-a-common-misuse/