I have the next problem, for which I would appreciate your help:
There is an EJB running in Jboss 7.1 which needs to be accessed from another EJB running over Jboss 5.1.
I have followed the instructions of several pages. I got the communication to the ejb in Jboss 7.1 from a plain java class using:
final Properties jndiProperties = new Properties(); jndiProperties.put("java.naming.factory.initial","org.jboss.naming.remote.client.InitialContextFactory"); jndiProperties.put(InitialContext.PROVIDER_URL, "remote://127.0.0.1:4448"); jndiProperties.put("jboss.naming.client.ejb.context", true); //jndiProperties.put(Context.SECURITY_PRINCIPAL, "client"); //jndiProperties.put(Context.SECURITY_CREDENTIALS, "password"); jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); final Context context = new InitialContext(jndiProperties); return (BeanRemoteInterface) context.lookup(LOOKUP_STRING);
(I have changed the defect port 4447 to 4448 and desactivated the realm-security subsystem, so the user and pass are not necessary for now)
However when I try communicate from the ejb in jboss 5.1, it doesn’t work. I made the changes to the creation of the InitialContext, and after a lot of tests I got this error wich i couldn't solve:
12:15:13,219 ERROR [STDERR] javax.naming.CommunicationException: Could not obtain connection to any of these urls: remote://127.0.0.1:4448 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server remote://127.0.0.1:4448:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server remote://127.0.0.1:4448:1099 [Root exception is java.net.UnknownHostException: remote://127.0.0.1:4448]]]
By the way!!! jboss 7.1 is running with -b 0.0.0.0, so that's not the problem.
Thanks in advanced.