Hi,
I have two Jboss servers (A and B), one of which provides a service
to the other (e.g. jms q).
When I use a standalone jvm it connects to the jboss B jndi and everything works ok (using the initial context java.naming.provider.url property).
When I try to connect to jboss B from inside jboss A (in a jsp or startup code) it doesnt work, somehow the initial context I get back is the local one and not the remote one.
I tried to do the same with a datasource and got the same result.
I saw somewhere that there is a default behavior that if the url
is not successfully processed then the default goes back to localhost,
I just dont understand why it happens inside Jboss and doesnt happen on a regular JVM.
How can I make this work ?
I'm using: Jboss 3.2.6, win2k, hsqldb (datasource db)
Code is:
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL,"jnp://mypc:1099/");
Context ctx = new InitialContext(env);
x = ctx.lookup("java:/MyDS");
Any help will be appreciated,
thanks,
Auzi