5 Replies Latest reply on Feb 27, 2006 10:48 AM by lbrd

    Web Application Detail through JMX(Urgent require).

    lbrd

      hi
      already i asked this question many ways but still i am searching the answer of this question, already i searched in google and many more search engine. but i couldn't found any proper answer.

      Already i got some success to found Application Server CPU Usage parameters and JDBC Parameters as well some basic Jboos Monitor Parameter like start date,version and etc. but for web application parameter............huh.........pls help me.

      i need some WebApplication parameters as below. and i already get the Instance of
      MBeanServerConnection. and on the base of it already i found

      i) Application Server Monitor Parameter and JDBC Parameter.

      But, some how i couldn't found the proper MBean which will give me the WebApplication Parameters detail like as follow.

      i)WebApplication Name
      ii)Context root
      iii)Response Time and many more....

      see i am using HttpAdaptor for getting MBeanServer Instance and Parameter because my JBoss Monitor application is deployed at outside the JBoss server.

      can anyone tell me which MBean is responsible for giving me this WebApplication Parameter. Which domain name and Service or type i will have to pass in ObjectName Constructor.

      pls this is third time i am putting my question here...

      ur small clue can be appreciable.... pls help me this is urgently require
      .


      lbrd







        • 1. Re: Web Application Detail through JMX(Urgent require).
          dimitris

          Look at the http://localhost:8080/web-console, J2EE Domains

          Browse the web console jsps/source code (this is the console module) to see how the stats are implemented e.g. Servlet.jsp

          • 2. Re: Web Application Detail through JMX(Urgent require).
            lbrd

            thanks for giving me reply,

            but i am new for JBoss - JMX.

            NOW, i browsed the http://localhost:8080/web-console, J2EE Domains , Manager , Jboss Root folder.

            i am able to find web-console-war but i am not able to find Jsp/Source Code for Servlet.jsp can u pls suggest me what i should do now.

            pls tell me am i on write path? as u said.


            lbrd.

            • 3. Re: Web Application Detail through JMX(Urgent require).
              lbrd

              hi,

              ok fine i got the Servlet.jsp but now my question is

              this servlet is deployed in the same JBoss Server but i want this information from outside the JBoss.

              how it can be possible to get Web Application Detail from outside the JBoss?

              becaue my program is simple Java Main program which connect with the server at runtime with the help of RMIAdaptor OR HttpAdaptor with the help of InitialContext.

              Now, i cannot get the detail like Web-Console/Servlet.jsp , because this Web-Console deployed in JBoss But in my case i want it from outside the JBoss.

              can u help me to identified how can i do this?

              lbrd.

              • 4. Re: Web Application Detail through JMX(Urgent require).
                dimitris
                • 5. Re: Web Application Detail through JMX(Urgent require).
                  lbrd

                  ya ,

                  i tried to find from

                  http://www.jboss.org/wiki/Wiki.jsp?page=FAQJBossJMX

                  but, i couldn't ...

                  see actually i want to Monitor Web Application Parameter but not from the inside of JBoss but from OutSide of JBoss.

                  For this i connect my agent through HttpAdaptor okay, now i can manage to get parameter like Server Started date and time OR Version, etc. but i am not able to get proper ObjectName which will give me the detail of
                  WebApplication Parameter.

                  Now, i tried one more thing as below,

                  ObjectName nameWebModule = new ObjectName("jboss.management.local:J2EEApplication=Notification.ear,J2EEServer=Local,j2eeType=WebModule,name=admincentral.war");
                  ObjectName nameContainerName = new ObjectName("jboss.web:service=WebServer");
                  ObjectName nameservletServiceName = new ObjectName("jboss.web:serviceName=jboss.web,type=Service");
                  try {
                  ServletMBean smbean = new Servlet(nameWebModule,nameContainerName,nameservletServiceName);

                  System.out.println("Servlet Name:" + new ObjectName(smbean.getobjectName()).getKeyProperty("name"));
                  } catch (InvalidParentException e5) {
                  // TODO Auto-generated catch block
                  e5.printStackTrace();
                  }



                  but this give the NullPointerException at javax.management.ObjectName servletServiceName.



                  lbrd.