try
{
scriptEngine.prepareHandlerExecution(hc);
String script = handlerDef.getScript();
scriptEngine.executeScript(script, "handler script", currentSocket.getNode().getQualifier().toString());
scriptEngine.finishHandlerExecution(hc);
}
finally
{
getScriptEngineFactory().releaseScriptEngine(scriptEngine);
}