• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

'ping-ing' Websphere

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Andrew Obodoefuna
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
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
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic