0

I have a client application which accesses a web service api using apache axis.

My client is a service which calls the web service randomly. So I do not know when exactly the interaction happens.

I want to keep the session active betweeen the web service calls.

I am thinking of having a seperate thread which periodically calls a dummy method so that the session never times out? is this a right idea or does it have any draw backs?

Another way is to relogin when ever a "session timed out" exception is thrown while accessing the webservice. But since many objects can interact with the web service this will create new problems like synchronization to be handled.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
Praveen
  • 166
  • 2
  • 4
  • 13
  • Why didnt you just set the session to be alive for a very long time? How about a day? two days? is that enough? – Rosdi Kasim May 10 '12 at 16:46
  • I am a client of the web service and do not have a say on that. Also, one or 2 days is not enough for me. – Praveen May 14 '12 at 05:53

0 Answers0