/** * List all currently registered trace sessions * * @throws SQLException */ public void listTraceSessions() throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_list)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * List all currently registered trace sessions * * @throws SQLException */ public void listTraceSessions() throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_list)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Stops a trace session with the given trace session ID * * @param traceSessionId * The trace session ID * @throws SQLException */ public void stopTraceSession(int traceSessionId) throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_stop, traceSessionId)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Suspends a trace session with the given trace session ID * * @param traceSessionId * The trace session ID * @throws SQLException */ public void suspendTraceSession(int traceSessionId) throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_suspend, traceSessionId)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Suspends a trace session with the given trace session ID * * @param traceSessionId * The trace session ID * @throws SQLException */ public void suspendTraceSession(int traceSessionId) throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_suspend, traceSessionId)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Resumes a trace session with the given trace session ID * * @param traceSessionId * The trace session ID * @throws SQLException */ public void resumeTraceSession(int traceSessionId) throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_resume, traceSessionId)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Stops a trace session with the given trace session ID * * @param traceSessionId * The trace session ID * @throws SQLException */ public void stopTraceSession(int traceSessionId) throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_stop, traceSessionId)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Resumes a trace session with the given trace session ID * * @param traceSessionId * The trace session ID * @throws SQLException */ public void resumeTraceSession(int traceSessionId) throws SQLException { try (FbService service = attachServiceManager()) { service.startServiceAction(getTraceSPB(service, isc_action_svc_trace_resume, traceSessionId)); queueService(service); } catch (IOException ioe) { throw new SQLException(ioe); } }
/** * Starts a trace session with an optional trace session name and configuration * * @param traceSessionName * The trace session name (optional) * @param configuration * The trace configuration. For an example, look into fbtrace.conf in the root directory of your * Firebird installation * @throws SQLException */ public void startTraceSession(String traceSessionName, String configuration) throws SQLException { if (configuration == null || configuration.equals("")) { throw new SQLException("No configuration provided"); } if (traceSessionName == null) { traceSessionName = ""; } synchronized (this) { OutputStream currentLogger = getLogger(); if (currentLogger instanceof TraceStream) { currentLogger = ((TraceStream) currentLogger).unwrap(); } setLogger(new TraceStream(currentLogger, traceSessionName)); FbService service = attachServiceManager(); ServiceRequestBuffer traceSPB = getTraceSPB(service, isc_action_svc_trace_start, traceSessionName, configuration); Thread t = new Thread(new TraceTask(service, traceSPB)); t.start(); } }
/** * Starts a trace session with an optional trace session name and configuration * * @param traceSessionName * The trace session name (optional) * @param configuration * The trace configuration. For an example, look into fbtrace.conf in the root directory of your * Firebird installation * @throws SQLException */ public void startTraceSession(String traceSessionName, String configuration) throws SQLException { if (configuration == null || configuration.equals("")) { throw new SQLException("No configuration provided"); } if (traceSessionName == null) { traceSessionName = ""; } synchronized (this) { OutputStream currentLogger = getLogger(); if (currentLogger instanceof TraceStream) { currentLogger = ((TraceStream) currentLogger).unwrap(); } setLogger(new TraceStream(currentLogger, traceSessionName)); FbService service = attachServiceManager(); ServiceRequestBuffer traceSPB = getTraceSPB(service, isc_action_svc_trace_start, traceSessionName, configuration); Thread t = new Thread(new TraceTask(service, traceSPB)); t.start(); } }