Hi,
I have two application servers and we're using EJB3 style stateless session beans.
I intentionally want to lookup from one app server, a remote EJB from the other. I attempt
to do this as follows:
Properties props = ...
props.put(InitialContext.PROVIDER_URL, "otherAppServer:1099");
InitialContext ctx = new InitialContext(props);
remoteEJB = ctx.lookup(EJB_NAME);
The problem is, nothing fails! I can successfully create the initial context. However,
when I the lookup happens, instead of returning a remote reference to the EJB in the other
app server, it gives me back a local reference!
From the googling I've done, I don't think this is a bug
necessarily, but more of a "feature" of jndi/jboss. My guess is that's
it's the IsLocalInterceptor that's making this judgement call.
Is there a way to disable this optimization for certain session beans? What's the best
way to accomplish what I'm after?
I'm using jboss 4.0.4 and EJB3.
If this is not an EJB issue and there is a better forum to post this in, please let me
know
Thanks in advance,
Justin
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046632#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...