I'm pretty sure java 1.5 will include jmx in j2se.
EJB2.1 mandates part of jmx within j2ee for use with JSR77
Most app servers are moving over to JMX for server
management, following JBoss's lead.
You should be ok moving your code to other app servers.
The best strategy is to write an MBean to the jmx spec. Then control it with another MBean that can take
advantage of JBoss specifc features like life-cycle,
hot-deployment, classloaders, etc.
This is how Jetty is integrated within JBoss.
Would Jetty be a good example, or is there another, perhaps smaller, that would suite me better as a starting point?