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

E17503-02

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:
oracle.jbo.ViewObject#setQueryTimeOut(int),

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

,


Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LongRunningStatementMonitor()
          Creates a new LongRunningStatementMonitor thread.
 
Method Summary
 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, currentThread, getName, getPriority, interrupt, isAlive, join, setPriority, sleep, start, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
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.


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

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.