1 Reply Latest reply on Jan 16, 2003 9:18 PM by adrian.brock

    jndi connection recovery

    mcofran

      I have a simple stateless session bean and a simple client that connects to it through jndi. If the ejb object the client holds goes stale(the server goes down), I want to catch the exception, retrieve a new object and process the clients request. When I do the new lookup though, the client trys to use its existing tcp connection to jndi and gets a connection refused to host exception. If I retry the lookup it now works and my client never knows the object went stale.

      My question is: Is retrying the lookup a couple of times safe solution or is this some fluke of a development environment that won't work the same way in production?

      Thanks for any input.