4 Replies Latest reply on Jun 25, 2002 10:37 AM by squelch

    MBeans and EJBs

    squelch

      Apologies if this has been answered before, been searching through forums, cannot find an answer.

      Given that customer MBeans are loaded before an ear is deployed, how can a custom MBean access any EJBs?

      Thanks in advance

        • 1. Re: MBeans and EJBs

          http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ can also cange the deployment scanner to deploy
          files in a different order.

          e.g.
          10myejb.jar
          20mymbean-service.xml

          Have a look at the comments in jboss-service.xml

          Regards,
          Adrian

          • 2. Re: MBeans and EJBs
            squelch

            Adrian,

            Is this a feature of version 3.0 only? I'm using 2.4.4

            • 3. Re: MBeans and EJBs

              Yes, you didn't mention your version ;-)

              You can sort the loading order by adding your MBean
              AFTER the AutoDeployer in jboss.jcml

              But you will hit problems with class visibility.
              Your MBean won't be able to see classes in your ejb's jar.
              The only way to solve this is to add your ejb's jar
              to lib/ext (or add a classpath extension mbean)
              but then you lose the ability to hotdeploy.

              These are some of the problems that 3.0 helps to
              solve.

              Regards,
              Adrian

              • 4. Re: MBeans and EJBs
                squelch

                Adrian,

                Thanks. I had actually set the custom MBeans after the autodeployer; the problem I was experiencing was stated in your last response - the MBeans cannot find the EJB since they currently aren't in the lib\ext folder.