5 Replies Latest reply on Sep 9, 2004 9:43 AM by arnold

    EJB clustering doesn't work if client is in same JVM?

    i_n_g

      Jboss: 3.2.5
      OS: Windows XP

      I have a clustered StatelessSessionBean installed in Server1/Server2 (actually same machine but different port settings).

      Another client (MBean) in Server1 calls this Stateless bean repeatedly. But it seems to use the LocalInvoker to call the StatelessBean in the same JVM.
      (I didn't make the stupid lookup mistake)

      However, I wrote a standalone client calling Clustered SLSB, it works!

        • 1. Re: EJB clustering doesn't work if client is in same JVM?
          i_n_g

          I checked the stacktrace, it seems InvokerInterceptor and MarshallingInvokerInterceptor will always bypass TCP port if it's "Local".

          So I plan to write my own interceptor and change standardjboss.xml. :-)


          2004-08-05 18:23:56,184 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
          2004-08-05 18:23:56,184 INFO [STDOUT] at org.jboss.invocation.Interceptor.invoke(InvokerInterceptor.java:49)
          2004-08-05 18:23:56,184 INFO [STDOUT] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
          2004-08-05 18:23:56,184 INFO [STDOUT] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
          2004-08-05 18:23:56,184 INFO [STDOUT] at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
          2004-08-05 18:23:56,184 INFO [STDOUT] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
          
          


          • 2. Re: EJB clustering doesn't work if client is in same JVM?
            i_n_g

            Found a solution: skiping "isLocal()"

            Replaced 4 classes: InvokerInterceptor, MarshallingInvokerInterceptor, JRMPInvokerHA, JRMPInvokerProxyHA.

            Change the standardjboss.xml for InvokerInterceptor and MarshallingInvokerInterceptor, Change the cluster-service.xml for JRMPInvokerHA

            • 3. Re: EJB clustering doesn't work if client is in same JVM?
              starksm64

              You should only have to replace the InvokerInterceptor.

              • 4. Re: EJB clustering doesn't work if client is in same JVM?
                i_n_g

                In standardjboss.xml, the clustered Stateless Bean will use

                InvokerInterceptor and JRMPInvokerHA, JRMPInvokerProxyHA when the container is "by-reference"

                MarshallingInvokerInterceptor and JRMPInvokerHA, JRMPInvokerProxyHA when the container is "by-value"


                If I don't change JRMPInvokerHA/JRMPInvokerProxyHA, they will be too smart to use LocalInvoker. :-)

                • 5. Re: EJB clustering doesn't work if client is in same JVM?
                  arnold

                  Hello all,

                  I am interested in the solution you have for this problem, can you explain more about what exactly you did?

                  I tried tweaking standardjboss.xml as well as reading the Admin doc, but can't quite figure out what I need to do.

                  Please help!

                  Thanks.