Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-04

oracle.jbo.mom
Class LongRunningStatementMonitor

java.lang.Object
  extended by java.lang.Thread
      extended by oracle.jbo.mom.LongRunningStatementMonitor
All Implemented Interfaces:
java.lang.Runnable

public class LongRunningStatementMonitor
extends java.lang.Thread

This thread monitors the long running statements and terminates the run away statements. It is started as a Daemon thread. Long running statements are generated by View Objects and Transaction Objects that have positive statement timeout values.

Since:
JDeveloper 10.1.3
See Also:
ViewObject.setQueryTimeOut(int),

Users can create their own LongRunningStatementHandle and add it to the monitor using the monitor API.

,


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LongRunningStatementMonitor()
          Creates a new LongRunningStatementMonitor thread.
 
Method Summary
protected  void finalize()
          Stop the thread gracefully.
 void monitor(LongRunningStatementHandle handle)
          Adds the handle to the monitored list.
 void run()
          The Thread begins with a loop to iterate over the monitored list of handles and invokes the cancel on expired ones.
 void stopGracefully()
          Terminates the thread gracefully.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongRunningStatementMonitor

public LongRunningStatementMonitor()
Creates a new LongRunningStatementMonitor thread.

Method Detail

monitor

public void monitor(LongRunningStatementHandle handle)
Adds the handle to the monitored list.

Parameters:
handle - a LongRunningStatementHandle

run

public void run()
The Thread begins with a loop to iterate over the monitored list of handles and invokes the cancel on expired ones. Between each iteration the thread sleeps for a second. To terminate the thread use the stopGracefully method. Since the thread is a Daemon thread it should not obstruct the shutdown of the JVM

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopGracefully

public void stopGracefully()
Terminates the thread gracefully.


finalize

protected void finalize()
                 throws java.lang.Throwable
Stop the thread gracefully.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-04

Copyright © 1997, 2010, Oracle. All rights reserved.