ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <>
Subject Re: Should ScriptRunner call terminate() on the BSFManager?
Date Tue, 25 Mar 2008 20:59:08 GMT wrote:
> Hi,
> We've recently integrated Jepp ( into our
> use of Ant via the BSF engine. This is very useful because we use Python
> for scripting quite a lot and it allows Python code to be used in full
> while also allowing access to Java objects.
> This has resulted in a Java OOM error, which I suspect is due to this
> integration change. There is a comment in the Jepp usage instructions
> that close() must be called on the Jep objects. This is done inside the
> terminate() method of the BSFJepEngine, which is called by the
> BSFManager on all engines. However I cannot see anywhere where
> BSFManager.terminate() is called inside ScriptRunner or elsewhere inside
> Ant. Should terminate() be called by ScriptRunner(), perhaps in the
> finally section in the executeScript method?

Others will be more familiar with the ScriptRunnerXXX classes than me
but in WebTest, its Script task has a keep flag. This might be a useful
concept to have here. Basically the flag allows you to distinguish between
scenarios where you want the binding retained across tasks (and hence
in the scenario above I suspect you don't want terminate() called) and
the case where you want a fresh manager/runner for each run. Again, I
haven't done a complete analysis of what gets called where in Ant at the
moment. Just noting an important use case for WebTest which I know is
in use in the field in many places.

P.S. For those that aren't aware, WebTest is an Ant extension for
testing web applications.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message