Tomcat and Appserver Agent

jamesmcfly

New Member
Hi all,
I am currently developing a web service using REST Adapter from Progress 11.3 for my mobile application.
I am having a problem, when the appserver do something rather time consuming or worst, stucked in an endless loop. When I tried to recall the web service (in this case using web browser to run the web service), the Appserver Agent keep running the old process (I used asbman to check the status of the Appserver Agent).

I noticed, that when I called Appserver procedure using Progress Client and disconnected from the Appserver, the agent were automatically set free. But when I was using the web service, the agent kept running until the task was done (or might be not finished if it was stucked in the endless loop). This situation is bad when all of the agents are running while the connection between tomcat and the client is lost and the appserver needs to be restarted.

My assumption is, that the tomcat does not know how to stop / cancel the agent's task when the tomcat lost the connection with the client. Is there a way how to solve this kind of problem?

Thank you
 

jongpau

Member
Hi,

You can look into using STOP-AFTER, it was introduced in 10.2 (off the top of my head).

From the online help:

"STOP-AFTER expression

The STOP-AFTER phrase specifies a time-out value for a DO, FOR, or REPEAT block. The integer expression specifies the number of seconds each iteration of a block has until a time-out occurs. If a time-out occurs, the AVM raises the STOP condition and default STOP condition handling occurs. Use an ON STOP phrase on the block (or an enclosing block) to alter the default STOP condition handling."
 
Top