Enabling JMX in JBoss AS 6 and JDK 6

I'm trying to create a demo of VisualVM (a really neat BCI tool that now ships with Oracle's JDK 6) connecting to Red Hat's JBoss Application Server 6. The wrinkle is that there is some interaction with JBoss' LogManager when JMX is turned on. This results in a torrent of class not found exceptions when starting up the Application Server.

To quell these errors, the following lines have to be added to the run.conf:


# stuff for JMX
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=6789"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=your.jboss.ip.address"
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

# there's an interaction between JDK 6 and JBoss LogManager when JMX is turned on..
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:/home/orly/sw/jboss-6.0.0.Final/lib/jboss-logmanager.jar"


Note that the above example turns off all authentication for JMX connections.. not something you'd want to do on a server that's on a public IP. But I am lazy.. in any case, if you're using Linux, you can use IPTables to restrict which IP's can connect to your JMX port.

How to Uninstall Expired LauncherPro from Android Phone

LauncherPro is an abomination of an Android application that expires itself after some time. In fairness to the developer, it pops up some nagware screens every now and then. However it then goes off the deep end into pure evil-ness:

Once expired, LP will not let you do anything except launch a browser and go to the LP web site to download the latest version. There are two bad things about this:
  • not everyone has a data connection (my phone line has no data plan); other folks went roaming and disabled their data plan. Imagine their surprise when they get off the plane in their home country and find that LauncherPro has bricked their phone.
  • in my case, Wi-Fi was turned off. LP is so incredibly bone-headed, it won't let you access phone settings to enable Wi-Fi!
Some folks suggest using ADB from the Android SDK to force-uninstall LP. However this didn't work for me, as the phone needs to be in Debug mode for ADB to work.

Guess what.. with LP hogging the home button, you can't go to Settings to turn on Debug mode.

I finally found a workable solution: download the latest LauncherPro APK (or hopefully any other APK). Connect your phone to your PC and mount the SD card. Copy the new APK to the top-level of the SD card and rename it to something short (like lp.apk).

Unmount the phone, then in the phone browser (which is the only thing LP lets you run), type the following in the URL bar:

file:///sdcard/lp.apk

(notice the three slashes)

This will force-launch the Installer application on the phone. Now on my phone, it was set to disallow non-Android Market apps from installing; since the APK is not off the Android Market, the phone popped up an error and offered to let me change the application setting. Which launches the Settings application.

The Settings application also allows you to uninstall applications.

Which finally allowed me to get rid of that misbegotten abomination LauncherPro.

On the other hand, if your phone was already configured to allow non-Android Market apps to install, you may not get the Settings up. In which case, allow the newer LP to install and hopefully the expiration bricking would go away.

Me, I've sworn off LauncherPro forever. Get ADW Launcher instead.