use of com.servoy.j2db.IServiceProvider in project servoy-client by Servoy.
the class SessionClient method shutDown.
/**
* @see com.servoy.j2db.ClientState#shutDown(boolean)
*/
@Override
public void shutDown(boolean force) {
shuttingDown = true;
IServiceProvider prev = null;
try {
prev = testThreadLocals();
super.shutDown(force);
if (scheduledExecutorService != null) {
scheduledExecutorService.shutdownNow();
scheduledExecutorService = null;
}
} catch (RuntimeException e) {
Debug.error("shutdown error:", e);
throw e;
} finally {
unsetThreadLocals(prev);
shuttingDown = false;
}
}
use of com.servoy.j2db.IServiceProvider in project servoy-client by Servoy.
the class RemoteDebugScriptEngine method executeFunction.
@Override
public Object executeFunction(Function f, Scriptable scope, Scriptable thisObject, Object[] args, boolean focusEvent, boolean throwException) throws Exception {
if (debugger != null && !listenerAdded) {
listenerAdded = true;
debugger.addTerminationListener(RemoteDebugScriptEngine.this);
}
IServiceProvider prev = J2DBGlobals.setSingletonServiceProvider(application);
try {
executingFunction.incrementAndGet();
return super.executeFunction(f, scope, thisObject, args, focusEvent, throwException);
} finally {
J2DBGlobals.setSingletonServiceProvider(prev);
executingFunction.decrementAndGet();
}
}
use of com.servoy.j2db.IServiceProvider in project servoy-client by Servoy.
the class ServoyDebugFrame method onEnter.
/**
* @see org.eclipse.dltk.rhino.dbgp.DBGPDebugFrame#onEnter(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable, java.lang.Object[])
*/
@Override
public void onEnter(Context cx, Scriptable activation, Scriptable thisObj, Object[] args) {
this.args = args;
if (parent != null) {
parentSource = parent.node.getSourceName() + '#' + (parent.getLineNumber());
}
super.onEnter(cx, activation, thisObj, args);
debugger.onenter(this);
IServiceProvider sp = J2DBGlobals.getServiceProvider();
if (sp != null && sp.getDataServer() instanceof ProfileDataServer) {
((ProfileDataServer) sp.getDataServer()).addDataCallListener(this);
}
startTime = System.currentTimeMillis();
}
use of com.servoy.j2db.IServiceProvider in project servoy-client by Servoy.
the class ServoyDebugFrame method onExit.
/**
* @see org.eclipse.dltk.rhino.dbgp.DBGPDebugFrame#onExit(org.mozilla.javascript.Context, boolean, java.lang.Object)
*/
@Override
public void onExit(Context cx, boolean byThrow, Object resultOrException) {
endTime = System.currentTimeMillis();
super.onExit(cx, byThrow, resultOrException);
debugger.onexit(this);
IServiceProvider sp = J2DBGlobals.getServiceProvider();
if (sp != null && sp.getDataServer() instanceof ProfileDataServer) {
((ProfileDataServer) sp.getDataServer()).removeDataCallListener(this);
}
}
Aggregations