5 Replies Latest reply on Apr 21, 2003 7:39 AM by Juha Lindfors

    Mbean

    trigyn Newbie

      Can someone please tell me the steps to
      deploy Mbean in jboss 3.0.0

      I am using Mbean for startup class in my ejb application.(is this the only way to do it?)

      The startup class will be used to create home for ejb and load master data.

      Thanks in advance

        • 1. Re: Mbean
          Juha Lindfors Master

          Create a SAR archive, this is how all services are deployed to the server so just look at any .sar archive for details (or jboss-service.xml file).

          • 2. Re: Mbean
            trigyn Newbie

            I have created a Mbean for startup (see attached files)

            The name of .sar file is trigyn which I have placed in jboss/server/defualt/deploy. The sar contains the 2 classes and service xml

            When i start the jboss server i am getting the foll error

            11:29:36,832 ERROR [SARDeployer] create operation failed for package file:/D:/jboss-3.0.0/server/default/deploy/trigyn.sar
            org.jboss.deployment.DeploymentException: Class does not expose a management interface: com.les.startup.StartupClass; - nested throwable: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: com.les.startup.StartupClass)
            at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:178)
            at org.jboss.system.ServiceController.install(ServiceController.java:194)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org

            • 3. Re: Mbean
              Juha Lindfors Master

              Rename ServerStartupMBean to StartupClassMBean (spec requirement for Standard MBeans)

              • 4. Re: Mbean
                trigyn Newbie

                Thanks juha,

                Does my SAR need to contain the jar too?
                coz my StartupClass (which implements StartupClassMBean ) calls another class ServerStartup which actaully loads the data ,ejb etc.

                16:44:49,907 ERROR [MainDeployer] could not start deployment: file:/D:/jboss-3.0.0/server/default/deploy/trigyn.sar
                java.lang.NoClassDefFoundError: com/les/util/ServerStartup
                at com.les.startup.StartupClass.start(StartupClass.java:29)
                at java.lang.reflect.Method.invoke(Native Method)

                • 5. Re: Mbean
                  Juha Lindfors Master

                  > Does my SAR need to contain the jar too?
                  > coz my StartupClass (which implements
                  > StartupClassMBean ) calls another class ServerStartup
                  > which actaully loads the data ,ejb etc.

                  Either include the jar inside the SAR or provide a tag as part of your xxx-service.xml:

                  Examples: