4 Replies Latest reply on Jun 1, 2004 7:27 PM by Viet

    EJB archives structure and ro/rw

    Mika Goeckel Newbie


      When building let's say bb I see, that the nukes-bb-ejb-ro.jar / nukes-bb-ejb-rw.jar only contains the .xml files but not the compiled bean classes.
      Is the assumption correct, that these are in the lib.jar because they are used by both rw and ro versions?

      Does that mean, that the difference in behaviour is simply achieved through the different container-config? How is controlled, that the beans are ro only?

      Cheers, Mika

        • 1. Re: EJB archives structure and ro/rw
          jae Master

          correct - by packaging the ejbs in the lib.jar, you deploy the class files only once, and allow yourself to reuse the same code by just specifying different deployment descriptor configurations.

          control comes from deployment configuration (which is specified in xdoclet) and also partially in the code by making sure you've used the ro beans for ro ops.

          • 2. Re: EJB archives structure and ro/rw
            Viet Master

            that's it, each bean is deployed twice. RO bean have locking removed and have a a customized interceptor stack that makes a proxy act as a value object.

            • 3. Re: EJB archives structure and ro/rw
              Mika Goeckel Newbie

              This is really clever!

              In order to make the Interceptors available to other modules it would make sense to move them to nukes.core.ejb.interceptor -- BBTools needs some cleanup anyway, it's a hotchpotch of concerns.

              I've coded the changes and added some comments for clarification in the Interceptor classes, how do you want me to submit them? There seems to be no class related to nukes in the sourceforge tracker.

              In particular I've got:
              A diff for BBTools, jboss-container.xml (hsqldb, mysql and postgres)
              Three new classes (two Interceptor and one utility for the common code)

              • 4. Re: EJB archives structure and ro/rw
                Viet Master

                file it as a bug report. I don't know if these interceptors can be used elsewhere though.

                the value object interceptor should be a client interceptor too instead of being a server side interceptor.