Not sure how many people know about this but most of BlazeDS/LCDS server classes are exposed as JMX MBeans which means they can be viewed with a JMX enabled client such as jconsole. Additionally, BlazeDS/LCDS comes with a simple application called ds-console that can be used to view these MBeans as well. These MBeans provide information about the state of the server such as number of Flex Sessions, number of Flex Clients, command counts, message counts, along with some performance related info. If you want to check it out yourself, here’s what you need to do.
First, you need to make sure manageable flag is set to true in services-config.xml (by default, it’s enabled). This makes sure MBeans are created and exposed via JMX server. You can turn off management if you don’t want your application to be available via JMX or for other reasons (eg. Goggle App Engine does not support JMX for example).
Then, you can start your application along with ds-console application. Ds-console has a few tabs but I think the “Generic Administration View” is the most useful one. It shows all the exposed MBeans in a tree like structure:

DSConsole application.
You don’t actually need ds-console to see these MBeans. You can use jconsole that comes with Java. Setup is pretty easy. As you first start your server, you need to make sure JMX is enabled. You can do this in a number of ways but one easy way to set the following Java option in the terminal and start the server.
export JAVA_OPTS=-Dcom.sun.management.jmxremote
Then, simply start jconsole from the terminal and attach to your server. You should see the same tree view in jconsole:

JConsole application
Like this:
Be the first to like this post.