org.apache.karaf.main
Class OracleJDBCLock

java.lang.Object
  extended by org.apache.karaf.main.DefaultJDBCLock
      extended by org.apache.karaf.main.OracleJDBCLock
All Implemented Interfaces:
Lock

public class OracleJDBCLock
extends DefaultJDBCLock

Represents an exclusive lock on a database, used to avoid multiple Karaf instances attempting to become master.

Version:
$Revision: $

Constructor Summary
OracleJDBCLock(java.util.Properties props)
           
 
Method Summary
 boolean lock()
          When we perform an update on a long lived locked table, Oracle will save a copy of the transaction in it's UNDO table space.
 
Methods inherited from class org.apache.karaf.main.DefaultJDBCLock
isAlive, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleJDBCLock

public OracleJDBCLock(java.util.Properties props)
Method Detail

lock

public boolean lock()
When we perform an update on a long lived locked table, Oracle will save a copy of the transaction in it's UNDO table space. Eventually this can cause the UNDO table to become full, disrupting all locks in the DB instance. A select query just touches the table, ensuring we can still read the DB but doesn't add to the UNDO.

Specified by:
lock in interface Lock
Overrides:
lock in class DefaultJDBCLock
Returns:
true if connection lock retained, false otherwise.


Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.