-
1. Re: JNDI lookup for object in remote server returns local ob
waynebaylor Oct 15, 2007 2:05 PM (in response to delabu)where is the lookup code located? application client (with a main method), in a servlet/jsp, etc.?
-
2. Re: JNDI lookup for object in remote server returns local ob
delabu Oct 16, 2007 3:09 AM (in response to delabu)The lookup code is in a Stateless Session Bean in the JBoss Master. So, in my diagram, it's in the "middle" section.
This Statless Session Bean has to look up the Stateless Session Bean in one of the remote nodes and do a call to that.
The sequence is thus:
1. Client (eg. command line) looks up Master Stateless Session Bean and calls it.
2. Master Stateless Session Bean looks up Node Stateless Session Bean (which can be on the local JBoss, but usually in another Node JBoss) and calls that.
The lookup code in 2. always returns a local instance of Node Stateless Session Bean even though the lookup specified a remote Node JBoss's IP address and I wanted a remote proxy to the Node Stateless Session Bean on the remote Node JBoss.
Thanks. -
3. Re: JNDI lookup for object in remote server returns local ob
waynebaylor Oct 16, 2007 5:05 PM (in response to delabu)just to make sure, when you deploy the ear to the Master Node it is also deployed to other Nodes right?
i wouldn't be suprised if when the remote lookup fails the local context is then checked. -
4. Re: JNDI lookup for object in remote server returns local ob
delabu Oct 17, 2007 10:37 AM (in response to delabu)The deployments seems ok as far as I can acertain. When I undeploy the Node ear from the Master jboss, the lookup to the remote Node works perfectly.
If there was a problem with it not getting the remote instance, it should have produced an error in this case. But it gets the remote instance and executes without problem.
Interesting thing is, starting Master JBoss without the node causes getting the remote Node. Hot deploying Node into master, still get remote node. Restart JBoss and I get the local Node again, not master. It's as if once I get a context, it doesn't get re-created, even though I did acquire a new context. Is it possible that the Context is a Singleton and that subsequent retrieval of contexts always return the same instance, regardless of the parameters I pass when asking for the context? -
5. Re: JNDI lookup for object in remote server returns local ob
delabu Oct 18, 2007 5:05 AM (in response to delabu)I have created a test project that recreates this behaviour. If anyone is interested, I can send it or upload it somewhere.
-
6. Re: JNDI lookup for object in remote server returns local ob
subo2008 Oct 8, 2008 4:23 AM (in response to delabu)Is there any solution or workaround available regarding this problem?
Nearly one year later, I'm facing the same issue with JBoss 4.2.3.GA.
Thanks,
Sven -
7. Re: JNDI lookup for object in remote server returns local ob
delabu Oct 8, 2008 5:04 AM (in response to delabu)Sadly I have never managed to get an anwer to this problem. We have resorted to changing our whole layout of servers and then get by by not deploying the relevant code on the "master" node. It means that those can only be accessed at the remote nodes and the resolution of those reserver work correctly.
I hope you have more luck in finding a solution and would be grateful if you can post it here should you get one!
Etienne -
8. Re: JNDI lookup for object in remote server returns local ob
nakker Oct 1, 2009 8:33 PM (in response to delabu)Have you tried
properties.put("jnp.disableDiscovery", "true");
Worked for me in a similar situation. This property forces the connection to only connect to the specified server and no one else (including self). It does have clustering implications you need to examine though.