5 Replies Latest reply on May 11, 2004 6:57 PM by gorano

    EJB communication

    cari34

      Hi guys,
      I have several EJBs deployed on the same JBOSS 3.2.2 server.
      The communication between these EJBs is through the remote interfaces.

      I would like to know if JBOSS automatically applies the passed-by-reference model when it finds that the EJBs are on the same container, even if the calls are made through the remote interface ?

      Or should I declare this in the jboss.xml file of the EJBs in question ?

      Have you any idea about this ?

      Thank you very much.

      Cari.

        • 1. Re: EJB communication
          sesques

          Hi,

          Nothing to do, it is the standard behaviour.

          Pascal

          • 2. Re: EJB communication
            gorano

            Why not using local interfaces?

            If you have no intention to split your beans over different JBoss instances
            than you have a perfomance loss on using remote.

            /G

            • 3. Re: EJB communication
              darranl

               

              you have a perfomance loss on using remote


              In what way? JBoss treats them in the same as local interfaces by default anyway.

              • 4. Re: EJB communication
                cari34

                Thank you guys,
                It's greate.

                Cari.

                • 5. Re: EJB communication
                  gorano

                  Yes you are right, JBoss pass-by-reference if the remote interface is on the same machine, and this is particular to JBoss, as I understand it
                  (I take my comment about "performance loss" back).

                  However you might consider the following differences between remote and local:

                  1. No need to catch remote exceptions when using local.

                  2. This will free callers from dependence on the EJB API. N ot a big deal but...

                  3. portability to less clever ejb containers (where we have pass-by-value).

                  4. Security! Data is never directly accessible outside the container via port 1099.

                  I had to find some advantages of using local interfaces so I can justify
                  my own use of them ;-))

                  Cheers

                  Goran