Announcement Announcement Module
Collapse
No announcement yet.
JMX and MX4j - Issues with Operation invokation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMX and MX4j - Issues with Operation invokation

    Hi

    I am able to expose my MBeans from a Spring context. I am using Mx4j in Tomcat 4.1.3 and Mc4j as my JMX console.

    My beans are listed fine in the console but any operations I fire through console do not make thier way to the actual implementation. The console does not throw up any exception. It just says there is no data to display.

    When I put my application in debug mode my breakpoints are not hit confirming that method is not being invoked.

    Does anyone have faced this before?

    Any help would be appreciated.

    Thanks,
    -Nilesh

  • #2
    What version of JDK and MX4j are you using? For debugging expose just a simple bean and enable logging inside Spring and Tomcat. This should provide some starting points.

    Comment


    • #3
      Also what version of Spring JMX are you using - there were some problems in earlier versions.

      Rob

      Comment


      • #4
        To answer both the questions:

        JDK 1.4.2
        Mx4J 1.1.1
        Spring 1.2 RC2

        I also tried with latest snapshot of Spring Build without any success.

        -Nilesh

        Comment


        • #5
          Check out the Wiki for app server compatibility notes http://opensource.atlassian.com/conf...DOC/Spring+JMX.

          For Tomcat 5.0.*, you need to specify a value of 0 for the default currencyTimeLimit descriptor this is done like so:
          Code:
          <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
          		<property name="beans">
          			<map>
          				<entry key="bean&#58;name=testBean">
          					<ref local="testBean"/>
          				</entry>
          			</map>
          		</property>
          		<property name="server">
          			<ref local="server"/>
          		</property>
          		<property name="assembler">
          			<bean class="org.springframework.jmx.export.assembler.SimpleReflectiveMBeanInfoAssembler">
          				<property name="defaultCurrencyTimeLimit">
          					<value>0</value>
          				</property>
          			</bean>
          		</property>
          	</bean>
          Rob

          Comment


          • #6
            MX4j 1.1.1 is pre JMX 1.2.1; a lot of things were unclear in those days. I suggest to upgrade the JMX library to 2.x or even 3.x; it should be clean upgrade with only some minor modifications.

            Let me know how it goes.

            Comment


            • #7
              Hi Guys,

              Thanks for your quick responses.

              Rob, the compatibility matrix has no mention of Tomcat 4.1.*. Does that mean it is not supported?

              -Nilesh

              Comment


              • #8
                I would say it hasn't been rather tested

                Comment


                • #9
                  Just did a test on Tomcat 4.1.27 and posted findings on the Wiki.

                  Rob

                  Comment


                  • #10
                    Hi Rob,

                    Still get the same error.
                    What is the JMX console you are using?

                    Also what version of MX4j did you use?

                    -Nilesh

                    Comment


                    • #11
                      Can you do the same? Mention the version of your JDK and mx4j? Have you tried using mx4j 2.x and 3.x?

                      Comment


                      • #12
                        Hi Costin,

                        I am using following:

                        Tomcat 4.1.2
                        Mx4j ( I tried all 1.1.1, 2.01 and 3)
                        Mc4j 1.2 beta 7 ( and this says it has support for Mx4j 111 and 2)
                        JDK 1.4.2_07

                        With newer versions of Mx4j (2 & 3) my Mc4j can not connect and gives me a NameNotFound (jrmp) exception. Do I have to enable JSR connection?

                        If yes, then somewhere it said that the version of Tomcat I am using does not support JSR. Is this true.

                        Any help would be appreciated.

                        -Nilesh

                        Comment


                        • #13
                          Try to connect programatically (it's very simple if you are using the mx4j examples) or use a jmx-explorer like application (there are some servlets that do this) and see if your beans are exposed and/or if you can't connect to the JMX server.

                          Comment


                          • #14
                            Hi Costin

                            I am able to expose beans through HttpAdaptor provided with Mx4j. I am able to do so with Mx4j 2.

                            But I am not able to invoke operations. It throws an exception.

                            Any ideas?

                            -Nilesh

                            Comment


                            • #15
                              Pls post your exception stack trace. About mc4j I tried working with it about 1 year ago and I had some problems in defining JSR-160 (JMX-Remote) connectors and in the end I stopped using them.
                              Try to isolate the problem at level of jmx without the mc4j for now.

                              Comment

                              Working...
                              X