6 Replies Latest reply on Aug 14, 2002 5:54 PM by luoz

    jmx/jboss manage external java process

    luoz

      I just want to know if JMX in the Jboss can manage, start, and stop an independent Java process outside of the container. My answer is No. I want to hear some corrections if I am wrong.

      It is feasible in the Sun JMX package, which is separated from J2EE. I have heard that JMX will eventually be part of J2SE package. I could see the rational behind that. It's supposed to provide universal management. Any other rumors?

      thanks
      Ming

        • 1. Re: jmx/jboss manage external java process

          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.

          Regards,
          Adrian

          • 2. Re: jmx/jboss manage external java process
            luoz

            Adrian,

            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.

            Thanks
            Ming

            • 3. Re: jmx/jboss manage external java process

              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.

              Regards,
              Adrian

              • 4. Re: jmx/jboss manage external java process
                luoz

                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?

                thanks all
                ming

                • 5. Re: jmx/jboss manage external java process

                  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.

                  Regards,
                  Adrian

                  • 6. Re: jmx/jboss manage external java process
                    luoz

                    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.

                    Ming