8 Replies Latest reply on Apr 29, 2003 12:01 PM by adrian.brock

    Cannot deploy MBean

    jacqueso

      Hi

      I have written a MBean and are trying to deploy it but I am getting the following error :Class does not expose a management interface : za.co.mtn.nis.propertymanager.jmx.PropertyManagerService

      I have attached my interface, class and deployment file . I am using JBOSS 3.0.6

        • 1. Re: Cannot deploy MBean

          You need to rename the interface to PropertyManagerServiceMBean.

          • 2. Re: Cannot deploy MBean
            stevecoh1

            I am having the same problem.

            Just to see if I understand you correctly:

            Any MBean similar to this (that is, not based on the JBoss helper classes) must be based on an interface with a name ending in "ServiceMBean"?

            • 3. Re: Cannot deploy MBean
              stevecoh1

              I have the same problem.
              I don't quite understand your answer. What is the reason for the renaming? Is the important thing that the interface hava a name ending in ServiceMBean? Trying that did not work in my case.

              • 4. Re: Cannot deploy MBean

                If you an MBean class
                com.foo.Blah
                its management interface should be
                com.foo.BlahMBean

                or com.foo.Blah should extend a class
                that has a management interface.

                Regards,
                Adrian

                • 5. Re: Cannot deploy MBean
                  stevecoh1

                  OK, so in other words, the fact that MBean class com.foo.Blecch INHERITS from management interface com.foo.BlahMBean is not sufficient - the management interface must be named exactly as the class with the MBean suffix attached? Is that what the rule is?

                  Further question: does this apply to packages as well? That is a management interface and its associated MBean must be in the same package? Or not?

                  • 6. Re: Cannot deploy MBean

                    Yes,

                    To redefine the management interface for
                    x.Y
                    it must be called
                    x.YMBean

                    Regards,
                    Adrian

                    • 7. Re: Cannot deploy MBean
                      stevecoh1

                      Thanks, got it going now.

                      Next question:
                      MBean is deployed and accessible from JMX console. How
                      do I access it programatically from my application? The normal course of my application will be to call the setter method of this bean repeatedly, and only occasionally get/set from the management console. How does the application find the bean instance it needs?

                      Another question. Does an MBean know its object name?

                      • 8. Re: Cannot deploy MBean

                        Try to create a new thread for each question.
                        It is easier for other people to follow.

                        Regards,
                        Adrian