Hi there, I have an application that calls EJBs deployed on a remote Websphere 3.5 server from a servlet on a client machine also running Websphere 3.5. No probs there. The client machine also holds a Service Locator class which handles the jndi look-up and caching of ejb home interfaces and other factory objects. So far so good. Now this service Locator class is required to performs checks from time to time on the remote server to see whether or not Websphere has gone down so that it can refresh its cache and do other clean up stuff. Now here's the problem. Does anyone know of a way of 'touching' websphere just to check if it is still alive or not? So far the only thing I can think of is calling create on a home interface and seeing if it thows an exception - but thats a bit heavy. Any suggestions at all would be greatly appreciated. Thanx, Andrew.
Hey, Just in case anyone is seeking a solution to a similar issue - I found that if I created a client socket (java.net.Socket) connection to the remote server using the server's IP address and the port Websphere is running on (usually :900), I could see if it was up and okay. In other words: successful socket creation = OK. exception thrown = Server Down. If anyone can see any issues with this I've missed - please tell.
Hi there, I met similar issue before. I cached a home Interface. If application server is down, or it restart itself, the cached home Interface cannot be used again. It will throw staledConnectionException (not sure about name). When this Exception happens, I know a need to find home again. Basically, I use StaledConnectionException to know application server is down and it restarted itself. Jun Hong
Jun Hong<br />SCJP, SCJD, SCWCD, SCEA<br />IBM Certified Systems Expert(V4.0)
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss