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

IsLocalProxyFactoryInterceptor routes to local proxy factory instead of a remote proxy factory

    XMLWordPrintable

Details

    • jboss-ejb3-proxy-impl:1.0.4 jboss-ejb3-proxy-clustered:1.0.2

    Description

      The fix EJBTHREE-1868 exposed a bug in the way the IsLocalProxyFactoryInterceptor is used. Mail conversation below:

      Turns out, the fix for EJBTHREE-1868 just exposed this other existing bug. This forum thread in EJB3 design forum explains the purpose of IsLocalProxyFactoryInterceptor http://www.jboss.org/index.html?module=bb&op=viewtopic&t=104924. The ProxyObjectFactory#getObjectInstance invokes createProxyFactoryProxy which internally ends up using the local IsLocalProxyFactoryInterceptor instance. All this happens on the client and the IsLocalProxyFactoryInterceptor is never serialized. Effectively this ends up being routed to the local proxy factory when the same bean is available on more than one running instance of the server.

      regards,
      -Jaikiran
      Jaikiran Pai wrote:
      > Hello everyone,
      >
      > I just fixed a bug in org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor (https://jira.jboss.org/jira/browse/EJBTHREE-1868) where a local proxy lookup was resulting in a remoting call. After this "fix", Our hudson run has been reporting failures with Clustered ForeignPartitionLocalInterceptorUnitTestCase
      >
      > That testcase starts up a cluster with 2 nodes. Both nodes have the same bean deployed (but in a practical scenario the implementations of the beans on both nodes might be different). Bean on node1 looks up same bean on node2 (by passing the PROVIDER_URL) to initial context. But the IsLocalProxyFactoryInterceptor after this fix identifies this as a local call (because it finds the same bean registered with the Dispatcher locally). As a result, a local proxy is returned and the test fails.
      >
      >

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            jaikiran Jaikiran Pai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: