2 Replies Latest reply on Sep 11, 2002 3:28 AM by juha

    MBean frustration - plz help

    jparks

      In Weblogic you can register a startup class that get's envoked by Weblogic. I believe that in JBoss it is the MBean.

      All I want to do is have a simple MBean that has one Attribute passed into it - ConfigLocation.

      I have my old Startup class from Weblogic that I am trying to retrofit. I have attempted many things and fail in all of them.

      here is what I have done

      Taken my startup class and extended ServiceMBeanSupport

      public StartFramework extends ServiceMBeanSupport

      I added the following to server/default/deploy/user-service.xml



      <!--
      | Add custom MBeans here. MBeans should be registered under the
      | 'user' JMX domain, or a domain specific to the component application.
      |
      | Do not place user components in the 'jboss' domain or any sub-domain.
      -->

      <!-- Example Service Configuration -->


      "d:\sandbox\framework\opt\ssa\config


      *note - this class is located in frameworks.jar - which is delpoyed to default/lib

      I keep getting the following error from JBoss 3.0.0_tomcat4.0.3

      javax.management.NotCompliantMBeanException: Class does not expose a management interface

      and my MBean is not registered.

      Also, how do I obtain the ConfigLocation attribute that is registered above with my Mbean. I have the normal getter/setter (getConfigLocation() and setConfigLocation()) does my attribute automatically get set?

      Please help - code snippet would be great

      thanks in advance!!!!