Hi, My jboss setup involves a servlet container and jboss instance on seperate machines. Specifically, I'm trying to access my jboss server that is living on another machine/domain across the WAN. I am able to get my remote interface & call the bean methods. I stash the remote interface Handle and try to access it on the next request. That is when I get a ServiceUnavailableException - specifically:
java.rmi.ServerException: Could not get EJBObject; nested exception is:
javax.naming.ServiceUnavailableException: JUDY [Root exception is java.net.UnknownHostException: JUDY]
Judy is my machine name. I have tried specifying by IP and full domain name jndi properties file:
- doesn't work. then I try
Neither work. Actually, they both work to get the remote interface initially. I actually get a Handle from getHandle() method: an instance of org.jboss.ejb.plugins.jrmp.interfaces.StatefulHandleImp
I stash the Handle in the HttpSession and then when I retrieve it, the getEJBOBject() call throws the exception. Notice the stack trace indicates the JBoss service is being looked up ONLY by machine name - regardless of whether I specify IP or full domain. Is this built in to prevent cross domain EJB container services? (btw, everything is fine when JBoss and my servlet container are on the same network LAN, but not across the WAN).
I could be off base here but you might try storing the Home instead of the Remote. I think you should then be able to create the remote again without having to do another lookup. I am not sure if you can actually expect the remote to remain valid if you are storing it on a disconnected server.