[jboss-dev-forums] [Design of EJB 3.0] - SFSB proxy creation process incorrectly routed locally
bstansberry@jboss.com
do-not-reply at jboss.com
Sun Mar 25 00:33:21 EDT 2007
Related discussions:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=101220
http://jira.jboss.com/jira/browse/EJBTHREE-773
Problem I found while testing my EJBTHREE-881 fix:
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 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, there's going to be confusion.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031364#4031364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031364
More information about the jboss-dev-forums
mailing list