Kodo 4.2.0 (DEPRECATED)

Class TableLockUpdateManager

  extended by org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
      extended by kodo.jdbc.kernel.AutoOrderUpdateManager
          extended by kodo.jdbc.kernel.TableLockUpdateManager
All Implemented Interfaces:
UpdateManager, Configurable

public class TableLockUpdateManager
extends AutoOrderUpdateManager

Example update manager, capable of statement batching, that ignores foreign keys and autoincrement, but optimizes for table level locking. Esp. important when using table level locking and trying to avoid deadlocks.

Nested Class Summary
protected static class TableLockUpdateManager.TableRows
          Rows for a particular table.
Nested classes/interfaces inherited from class kodo.jdbc.kernel.AutoOrderUpdateManager
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
Field Summary
Fields inherited from class kodo.jdbc.kernel.AutoOrderUpdateManager
batch, maxBatch, sqlComparator
Fields inherited from class org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
conf, dict
Constructor Summary
Method Summary
protected  Collection flush(RowManager rowMgr, PreparedStatementManager psMgr, Collection exceps)
protected  RowManager newRowManager()
 boolean orderDirty()
protected  Collection sortTables(Collection trs)
          Sort TableLockUpdateManager.TableRows by table.
Methods inherited from class kodo.jdbc.kernel.AutoOrderUpdateManager
flush, getMaximizeBatchSize, newPreparedStatementManager, setConfiguration, setMaximizeBatchSize
Methods inherited from class org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
addException, delete, endConfiguration, flush, insert, populateRowManager, startConfiguration, update, updateIndicators
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public TableLockUpdateManager()
Method Detail


public boolean orderDirty()


protected RowManager newRowManager()
Specified by:
newRowManager in class AbstractUpdateManager


protected Collection flush(RowManager rowMgr,
                           PreparedStatementManager psMgr,
                           Collection exceps)
Specified by:
flush in class AbstractUpdateManager


protected Collection sortTables(Collection trs)
Sort TableLockUpdateManager.TableRows by table. This implementation sorts tables lexically by table name. This is good for avoiding deadlocks in systems with table level locking. Some orderings may avoid deadlocks and be more scalable. E.g. sorting such that certain tables always come last will reduce the amount of time that those tables are locked. Sort order should probably be constant, though, in order to avoid deadlocks.

Kodo 4.2.0 (DEPRECATED)

Copyright 2015 Oracle, Inc. All Rights Reserved.

This documentation is deprecated and will be removed in the next release of WebLogic Server.

Oracle Fusion Middleware Oracle Kodo 4.2.0 API Reference (DEPRECATED)
11g Release 1 (10.3.6)
Part Number E13950-03