6 Replies Latest reply on Feb 4, 2005 6:42 PM by starksm64

    GaugeMonitor is not serializable?

    qdotlu


      If I created one GaugeMonitor instance from the client side, and set proper values, I am having problem using the RMIAdaptor to register it with a backend JBoss JMX Agent. It was complaining certain field is not Serializable.
      Other Monitor implementations have the similar problem.

      Is this a bug?

        • 1. Re: GaugeMonitor is not serializable?
          dimitris

          Try to use MBeanServer.createMBean(...) to create and register an MBean on the Server, rather than creating it on the client side.

          • 2. Re: GaugeMonitor is not serializable?

            I've added this question to the FAQ:
            http://www.jboss.org/wiki/Wiki.jsp?page=FAQJBossJMX

            • 3. Re: GaugeMonitor is not serializable?
              qdotlu

              I want to build an application that I can use a Web GUI in the front end to display all the existing MBeans registered with the MBean server. If I want to create a monitor against one MBean attribute, I have to ask the MBean Server to create one Montior MBean in the client side through RMIAdaptor.

              The MBeanServer is in the server side, we don't have direct access, except through RMIAdaptor. Therefore GaugeMonitor/StringMonitor etc. is better to be serializable.

              Not sure how other people are using Monitors, but this use case looks common to me.

              "dimitris@jboss.org" wrote:
              Try to use MBeanServer.createMBean(...) to create and register an MBean on the Server, rather than creating it on the client side.


              • 4. Re: GaugeMonitor is not serializable?
                dimitris

                I don't get it, why you "have" to create it on the client side?

                You tell the server to create it on the server side and you configure it as you would with any other MBean (again, through the MBean server), to monitor whatever you want.

                The web-console of jboss, does exactly that.

                • 5. Re: GaugeMonitor is not serializable?
                  qdotlu

                  Yes, we could register a empty GaugeMonitor in the client side and then call the "set attribute" methods the populate the content of the GaugeMonitor. But it is not as convenient as populating the content of GaugeMonitor and then create the MBean through RMIAdaptor. It is one remote call versus multiple.
                  :)

                  "dimitris@jboss.org" wrote:
                  I don't get it, why you "have" to create it on the client side?

                  You tell the server to create it on the server side and you configure it as you would with any other MBean (again, through the MBean server), to monitor whatever you want.

                  The web-console of jboss, does exactly that.


                  • 6. Re: GaugeMonitor is not serializable?
                    starksm64

                    So write a GaugeMonitorConfigurationService and the problem is solved. JMX is a non-remote spec as its base and has completely non-deterministic behavior when accessed over a remote connection since there are 0 guarentees with regard to remoteness at the jmx core. The jmx remoting spec does not address this basic issue.

                    Go join the jmx 2.0 spec and suggest that this be fixed.