3 Replies Latest reply on Feb 1, 2003 8:41 AM by Peter Doornbosch

    Local Interface questions

    Darrel Riekhof Newbie

      I'm running the jboss-tomcat distribution. I assume I can use local interfaces to call into my ejbs from my webapp classes since they both run in the same JVM. The jsp/servlet container is running inside the ejb container--is this the right way to think about it?

      Is there a noticeable performance difference from using local interfaces instead of remote interfaces when a webapp is running in same JVM as the ejb container?

        • 1. Re: Local Interface questions
          Greg Turner Apprentice

          In the same JVM, the web container is along side the ejb container, not one inside the other. When the two containers are running inside the same JVM, there is no difference in performance between using local or remote interfaces since JBoss optimizes the remote calls.

          • 2. Re: Local Interface questions
            Darrel Riekhof Newbie

            Then why would you ever want to use local interfaces?

            From my understanding, you would only be removing the flexibility of moving an EJB to a different server, and running the risk of introducing call-by-reference bugs if the ejb was ever moved away from webapp.

            • 3. Re: Local Interface questions
              Peter Doornbosch Apprentice

              > Then why would you ever want to use local
              > interfaces?

              In order to use container managed relationships. The EJB spec says these can only be used with local interfaces.

              > From my understanding, you would only be removing the
              > flexibility of moving an EJB to a different server,
              > and running the risk of introducing call-by-reference
              > bugs if the ejb was ever moved away from webapp.

              I totally agree.