Thank you very much Tom,
it seems to be a right way to organize long-time services.
It is interesting also to know, wether AXIS client when calling a
service keeps a connection alive or not. I have tried without proxy -
everything works!
I fought always that proxy is transparent.
German
Tom Oinn wrote:
German Sakaryan wrote:
Thank you Tom.
Do you mean that proxy closes a connection between client and proxy
when a timeout is expired?
It could potentially be either but is most likely to be both. It does
this to prevent requests 'hanging' and consuming resources within the
proxy, effectively a thread leakage problem.
In general it's not advisable to hold a web service call open for longer
than you can avoid, you might be able to get away with it but you're
very much at the mercy of the somewhat unpredictable set of proxies, NAT
layers etc inbetween your clients and the service.
The problem then is that web services are traditionally stateles with no
way of correlating several distinct communications into one logical
operation (i.e. create, submit, poll... get result, destroy). There are
various ways around this. Obviously you can implement it entirely
yourself, it's not too hard, or there are more complex 'standards' such
as WSRF (Web Service Resource Framework), LSAE (Life Sciences Analysis
Engine, not limited to the life sciences but less widespread) and the
various Globus toolkit based systems, all of which are rather complex.
It's possible you can get away with a very simple solution - we have a
service at the EBI (www.ebi.ac.uk) which works on the 'create,
manipulate, inspect, destroy' pattern by having the create method return
a string ID and all subsequent methods consume this ID as part of the
request. Internally this then uses a singleton Map to translate this ID
to an instance of a bean class which holds the state with the operations
within the service all having a 'lookup state, get state bean, do stuff'
form. This service, incidentally, has been running for 3 years with next
to no downtime based on the .jws deployment mechanism (I'm not sure I'd
actually suggest using this but hey, it's worked for us)
The WSDL for this service is at
http://www.ebi.ac.uk/collab/mygrid/service1/goviz/GoViz.jws?wsdl, I've
attached a generated diagrammatic view of how it would be called. In
this case the service is stateful because we want to be able to
manipulate the state explicitly but it would also work around the
timeouts you describe.
HTH,
Tom
--
Dr.-Ing. German Sakaryan
Computer Science Dept.
University of Rostock
Tel: +49 381 498-7585
Fax: +49 381 498-7642
E-mail: [EMAIL PROTECTED]
Home: http://www.informatik.uni-rostock.de/~gs137