I've set up two cluster nodes say node 1 and node 2. My need to look up Remote bean deployed in node 2 from node 1. I've tried to get Remote proxy by configuring below jndi properties.
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL, "remote:<node2 ipaddress>:4447");
jndiProps.put("jboss.naming.client.ejb.context", true);
haJNDIContext = new InitialContext(jndiProps);
But its of no good. So please any one tell me how to make remote ejb lookup based on ipaddress from server.
I need the equivalent way of HA-JNDI lookup as in JBOSS 5. Below is HA-JNDI look up which works fine for me in JBOSS AS 5 server.
Properties jndiProperties = new Properties();
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.iiop.naming.ORBInitialContextFactory");
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
jndiProperties.put(Context.PROVIDER_URL, nodeIP + "@1099");
haJNDIContext = new InitialContext(jndiProperties);
Thanks in advance.
The behaviour is different from AS7.
If you have a cluster why you need to lookup between such instances?
You need to have a outbound connection in AS7.1.
What version do you use exact?
You might read this