3 Replies Latest reply on Nov 17, 2007 3:04 AM by vijesh_a_v

    Shared bean in two different servers, instead of server1 to

    vijesh_a_v

      Hi,

      We have two different servers with some common reusable beans deployed in both.

      serverA calls the GenericBean in serverB. Even though the look up is done specifying url of serverB, the invocation is happening on the local GenericBean available in the serverA!!!

      Oddly, this behaviour is found only when the bean is clustered !!. Otherwise, the call reaches serverB as expected (in both default and all configuration).

      InvokerInterceptor.hasLocalTarget returns true. i.e return Registry.lookup(invocation.getObjectName()) != null; is true.

      Why is it happening only when the bean is clustered???.
      We would expect the call to go to serverB in both clustered and non-clustered state.

      JBoss 4.0.5
      ejb 2.1
      jdk 5
      Default clustering/loadbalancing configurations
      Same behaviour in single node and multi node clustering scenario

      Hopes to get some hints

      Regards,
      Vijesh

        • 1. Re: Shared bean in two different servers, instead of server1
          vijesh_a_v

          No responses yet.........
          Is it a bug? should I report it as a bug?

          Let me rephrase the question.

          A generic clustered bean is deployed in two different applications. Application_1 does a remote lookup of the bean in Application_2 and tries to invoke it. But instead of calling the bean instance in Application_2, the bean deployed in Application_1 is getting called!!. But the call gets executed properly and reaches Application_2 when the bean is not clustered and working fine in both default and all configuration.

          The issue comes up only when the bean is

          <clustered>true</clustered>


          Calls to other beans in Application_2 which are not deployed in Application_1, are going through as expected.

          • 2. Re: Shared bean in two different servers, instead of server1
            brian.stansberry

            This is the designed behavior. To get the behavior you want, you need to subclass org.jboss.invocation.InvokerInterceptor, override the isLocal(Invocation) method, and update your client-container configuration (e.g. the clustered-stateless-rmi-invoker section in conf/standardjboss.xml) to use your interceptor in place of the standard org.jboss.invocation.InvokerInterceptor.

            • 3. Re: Shared bean in two different servers, instead of server1
              vijesh_a_v


              Thanks for the reply........
              This should work fine

              Regards,
              Vijesh