4 Replies Latest reply on Dec 5, 2003 12:48 PM by jbossuserr

    Argument Passing Semantics

    jbossuserr

      Does JBoss implement "pass-by-reference" semantics in the local interfaces? The Jboss book says that this removes the overhead associated with serializing and deserializing every method parameter.

        • 1. Re: Argument Passing Semantics

          The default configuration uses pass by reference on all local component invocations, regardless whether they implement an EJB local or remote interface.

          -- Juha

          • 2. Re: Argument Passing Semantics
            jbossuserr

            According to EJB Spec version 2.0 sectin 24.2.7, the EJB containner is not allowed to pass non-remote objects by reference on inter-EJB invocation when the calling and called EJBs are collocated in the same JVM.

            Does Jboss adhere to EJB Spec in this case?

            Thanks.

            • 3. Re: Argument Passing Semantics

              Like I said, the default configuration always passes a reference if it detects a local invocation (the performance would be abysmal otherwise). You need to change the default configuration for your EJB proxies to change the semantics (configure ByValueInterceptor into the client proxy interceptor stack in your standardjboss.xml invoker-proxy-bindings).

              -- Juha

              • 4. Re: Argument Passing Semantics
                jbossuserr

                Thanks for pointing out the place I can make the change.