As part of the testing of the AS7 server configuration used by the OpenShift Express cartridge, I needed to profile how many threads were being created and run. I used Byteman to do this, and I describe how this was done in the following Byteman section article:

http://community.jboss.org/wiki/TrackingThreadsInJBossAS7