Search in sources :

Example 11 with IServiceProvider

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;
    }
}
Also used : IServiceProvider(com.servoy.j2db.IServiceProvider)

Example 12 with IServiceProvider

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();
    }
}
Also used : IServiceProvider(com.servoy.j2db.IServiceProvider)

Example 13 with IServiceProvider

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();
}
Also used : IServiceProvider(com.servoy.j2db.IServiceProvider)

Example 14 with IServiceProvider

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);
    }
}
Also used : IServiceProvider(com.servoy.j2db.IServiceProvider)

Aggregations

IServiceProvider (com.servoy.j2db.IServiceProvider)14 Solution (com.servoy.j2db.persistence.Solution)3 FlattenedSolution (com.servoy.j2db.FlattenedSolution)2 FormController (com.servoy.j2db.FormController)2 IForm (com.servoy.j2db.IForm)2 IRecordInternal (com.servoy.j2db.dataprocessing.IRecordInternal)2 Form (com.servoy.j2db.persistence.Form)2 FormScope (com.servoy.j2db.scripting.FormScope)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 ApplicationException (com.servoy.j2db.ApplicationException)1 FormManager (com.servoy.j2db.FormManager)1 IFormController (com.servoy.j2db.IFormController)1 ClientInfo (com.servoy.j2db.dataprocessing.ClientInfo)1 IRepository (com.servoy.j2db.persistence.IRepository)1 RepositoryException (com.servoy.j2db.persistence.RepositoryException)1 RootObjectMetaData (com.servoy.j2db.persistence.RootObjectMetaData)1 WebForm (com.servoy.j2db.server.headlessclient.WebForm)1 NGClient (com.servoy.j2db.server.ngclient.NGClient)1 NGClientWebsocketSessionWindows (com.servoy.j2db.server.ngclient.eventthread.NGClientWebsocketSessionWindows)1 IApplicationServerSingleton (com.servoy.j2db.server.shared.IApplicationServerSingleton)1