Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-925

SFSB proxy creation process incorrectly routed locally

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • AS 4.2.0 GA
    • AS 4.2.0 GA
    • None
    • None

      Say you have two completely unrelated SFSBs, Bean0 and Bean1, deployed on two different servers, node0 and node1. The only common point between Bean0 and Bean1 is they both are SFSBs bound in JNDI under "StatefulBeanRemote". Otherwise they are completely unrelated.

      Client on node0 then contacts the JNDI server on node1 and does a lookup of "StatefulBeanRemote" expecting to get a proxy for Bean1. The SFSB proxy-creation process will end up being routed locally to the proxy factory for Bean0. Wrong!

      Problem is this:

      1) When client does an SFSB lookup, they don't directly download the SFSB proxy. Instead they download a proxy to the bean's ProxyFactory. That proxy then makes a remoting RPC back to the remote server to get the SFSB proxy. See o.j.ejb3.JndiProxyFactory.

      2) The proxy to the remote ProxyFactory includes o.j.aspects.remoting.IsLocalnterceptor. That interceptor will bypass the remote call and invoke locally if the aop Dispatcher has a target registered with the same id as the target id associated with the call.

      3) For calls made by the proxy to the remote ProxyFactory, the target id is the jndiName of the bean (plus a constant). So, if an unrelated target is registered locally with the same JNDI name, the call will incorrectly be routed to the local bean's proxy factory.

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: