Yes, look at
java.lang.Runtime.exec() and java.lang.Process.destroy()
Yes, the plan is to include JMX in J2SE 1.5, providing
they can get the specs finished in time.
The idea is to monitor and manage the JVM using JMX.
You probably misinterpreted my first question. In Jboss, can an independent Java process be instrumented by JMX/MBean? I couldn't find any ways to do it. However, with SUN's JMX package, it's doable. You can launch your own JMX agent. Jboss doesn't provide the facility to launch users' own agent or API talking back to the agent in the container. Am I wrong here?
Any other alternatives to make a JMX instrumented process living outside of the container.
Yes, I misunderstood.
I'm not sure what your asking.
You can get an RMIConnector from JBoss's jndi
which will let you talk back to JBoss's MBeanServer.
I should have been more specific.
OK, I have a Java process which stays outside the Jboss container. It's a process, so you can not bring it into the container. It has its own main(). I want to instrument this process using Jboss's JMX and manage it via Jboss html page on 8082. I basically want to a universal management console on EJB and other Java processes.
Is that feasible?
Ok got you.
There is something in the next phase of the JMX
spec for doing this, it is called discovery.
I haven't followed it very closely, but the idea
to create MBeanServers in each VM then using
some magic (I think Jini was one suggestion) the
MBeans are automatically discovered by
the MBeanServers in other VMs.
JDMK provides this feature. Basically, deploying a discovery service MBean into MBean agent multicasts its address and related information. Any client listens to the this multicast group and port can locate the MBeanServer.