[jboss-user] [EJB 3.0] - Locally calling remote interface results in remote invocatio

bhawthorne do-not-reply at jboss.com
Tue Jun 9 18:02:47 EDT 2009

I've come across what looks like a bug in the EJB3 deployed with JBossAS 5.1.0, but I thought I would post here first for some confirmation.

We have a web app which may be deployed in the same container or externally, and thus makes calls to remote EJB interfaces. In the same-container case, I found that the calls were still going through the network stack, and narrowed it down to IsLocalProxyFactoryInterceptor in org.jboss.ejb3.proxy.impl.remoting.

In this class, it seems to use the system time of the class's initialization to determine if the call is local or not. The problem seems to lie in the static initialization, where the singleton instance is constructed _before_ the static 'stamp' variable is initialized. This results in marshalledStamp getting a value of zero, and when later compared to stamp in isLocal(), is always not-equal, and thus is never considered a local call.

I've patched the class by moving the stamp variable initialization to before the singleton init. I'm not clear on the relationship between this singleton and other deserialized instances, or how I might have affected other things, but my fix seems to work for us so far.

I can make a JIRA on this if my analysis here isn't completely off-base :)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236519#4236519

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236519

More information about the jboss-user mailing list