I am trying to call a EJB3 session Been from AWT as client
But i am getting "Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out"
- Make sure your jboss runs on localhost and your rmi port is 1099 (default values)
- Make sure you add jboss client jars in your classpath, if you have standalone application, if it runs on a jboss server no need to add extra jars into your classpath.
If you use -b parameter while starting server (e.g. run.sh -b 192.168.12.16) then use env.setProperty(Context.PROVIDER_URL, "192.168.12.16:1099");