Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3)
B16005-01


oracle.jbo.mom
Class LongRunningStatementMonitor

java.lang.Object
  extended byjava.lang.Thread
      extended byoracle.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.

,


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, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

stopGracefully

public void stopGracefully()
Terminates the thread gracefully.

finalize

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

Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3)
B16005-01


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