3 Replies Latest reply on Mar 28, 2002 4:48 AM by Adrian Brock

    MBean Architecture

    frank starsinic Newbie

      I've written a workflow application for JBoss.
      And... i've written a few MBeans to manage certain parts of the application.

      For our application, all my code goes into something called afsp.jar; and afsp.jar is dropped into the
      lib/ext directory in jboss. is this the proper thing to do?

      The MBeans that i wrote use utilitiy classes, etc. that are in afsp.jar. in fact, everything uses stuff from that jar file, which makes sense.

      My question is this... if i'm stopping and re-starting the MBean via http:8082 does the fact that the mbeans and the rest of the application use the same classes make any difference?

      if if modify a class in afsp.jar and re-deploy the mbean, does it pick up on those changes but the rest of the app server does not?

      am i supposed to be keeping all classes for an MBean separate from the rest of the application? that does not make sense because i would not be able to re-use code.

      should afsp.jar not be put into the lib/ext directory
      at all and just picked up somehow from an mbean during initialization somehow?

      should my application just be one big mbean?

      i want to make sure i'm architecting my applications as i should be.

        • 1. Re: MBean Architecture
          Adrian Brock Master

          Too many questions ;-)

          lib/ext is what jboss does with most services,
          but you won't get hot-deployment
          the classloaders for lib/ext are created at
          server start-up

          You didn't mention which version of JBoss you are using?

          With JBoss3.0 you can create a sar
          "super archive" this can contain
          ejbs, rars, wars, jars and MBean configuration
          and it is all hot-deployable

          How you package the application is for you to decide.
          You could create one big sar, or choose to
          "modularise" it for ease of development.
          Or you might decide to use service.xml snippets that
          point to specific archives for their classes.


          • 2. Re: MBean Architecture
            frank starsinic Newbie

            i think hot-deploy is, of course, a cool way to go so are you saying that if i want hot-deploy, i'll have to make my whole application an mbean ???

            can multiple mbeans share code and still be hot-deploy?

            • 3. Re: MBean Architecture
              Adrian Brock Master

              Hot deploy works for everything.

              Multiple MBeans can share hot-deployed jars.
              You have to declare the dependency on the jar to
              force a redeployment of the MBeans.