7 Replies Latest reply on Mar 15, 2002 6:29 AM by smike

    Local vs Remote Interfaces

    rlynn

      It appears that JBoss is smart enough to pass by reference even when using Remote Interfaces within a single JVM. If this is true, why would you use Local interfaces? Is there some other savings in using Local interfaces? Thanks for the help.

        • 1. Re: Local vs Remote Interfaces
          dhinojosa

          What version are you using? Just wondering because what I thought JBoss was smart enough now something else is happening. I am using 2.4.4 and these references aren't the same : (

          • 2. Re: Local vs Remote Interfaces
            dhinojosa

            Acutally I think they made all dependent value object immutable.

            • 3. Re: Local vs Remote Interfaces
              raulg

              Now I'm confused. The documentation for JBoss 2.4.x
              informs me that it only supports EJB 1.1. Under this spec
              there is no support for Local.

              Is the doc incorrect?

              • 4. Re: Local vs Remote Interfaces
                davidjencks

                jboss 2.4.x supports local interfaces and jms/mdb, both j2ee 1.3 features.

                As far as I can tell, the main reason for local interfaces is to prevent cmr relationships from going across vm boundaries, and to sugar coat the spec since all app server vendors were optimizing local calls anyway.

                • 5. Re: Local vs Remote Interfaces
                  giluka

                  You said JBoss 2.4.x can use local interface mechanism...
                  but how ?
                  I put in ejb-jar.xml file
                  <local-home>util.myLocalHome</local-home>

                  and in jboss-web.xml

                  <ejb-local-ref>
                  <ejb-local-ref-name>ejb/myLocalHome</ejb-local-ref-name>
                  <jndi-name>code/myLocalHome</jndi-name>
                  </ejb-local-ref>

                  Is this correct, no ?
                  In my client (a servlet) i put:
                  Object localRef = jndiContext.lookup("java:comp/env/ejb/myLocalHome");


                  Result is that these lines of code (in client) generate this exception:

                  javax.naming.NameNotFoundException: CodeLocalHome not bound


                  Can anyone help me please ?

                  • 6. Re: Local vs Remote Interfaces
                    giluka

                    ...sorry
                    Result is that these lines of code (in client) generate this exception:

                    javax.naming.NameNotFoundException: myLocalHome not bound


                    Can anyone help me please ?

                    • 7. Re: Local vs Remote Interfaces
                      smike