Is there anyway of running a bit of code in a Java agent when it gets killed by the agent manager because it has run longer than the timeout?
I am thinking something similar to the ‘Terminate’ part of a LotusScript agent.
I could write the agent to detect when it is getting near the timeout value and then close itself down, but would prefer to have the agent manager call my finalize code.
Subject: Unfortunately I know of no way to do this…
But I’d love to know how if I’m wrong! (impish grin)- I restructured an entire application that calls a Java agent to run it many times on smaller chunks mainly to avoid timeout problems. We didn’t like making the timeout 3 hrs when it normally ran in under five minutes, but on occasion crunched more data than expected. The process was split into two steps … the first enumerates the data available, which is very quick, and the second processes the data one piece at a time instead of trying to do it all in one go. It’s more robust that way, anyway, so it was a Good Thing! ™ regardless of why it was done.
Subject: RE: Unfortunately I know of no way to do this…
Thanks David, I will probably have to take that approach too.
The agent I have works like that anyway, one part pulls information from thousands of databases, the second collates the results and then pushes them into a single database.