Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.transaction
Interface TransactionLogger

    public interface TransactionLogger

Transaction log manager for two-phase commit.

A TransactionLogger accepts TransactionLoggable objects for asynchronous storage on disk in the transaction log, and drives their life cycle transitions (releasing and/or recovery).

Normal life-cycle of this object: `// Normal initialization t = new TransactionLogger(); // Performs recovery too // Normal operation (repeat as many times as necessary) t.store(obj); // Request some object to be stored on disk obj.onDisk(); // Object's callback gets invoked t.release(obj); // Release object when no longer needed // Prepare for normal shutdown t.checkpoint();`

See Also:
  `TransactionLoggable`

Method Summary
`void` | `checkpoint()` Perform a log checkpoint operation.
`int` | `getInitialRecoveredTransactionTotalCount()`
`String` | `getMigratedCoordinatorURL()`
`int` | `getRecoveredTransactionCompletionCount()`
`boolean` | `hasTransactionLogRecords()`
`void` | `release(TransactionLoggable obj)` Release an object previously stored.
`void` | `store(TransactionLoggable obj)` Accept an object for storage in the transaction log file.

Method Detail

### store

    void store(TransactionLoggable obj)

  Accept an object for storage in the transaction log file.

  This method returns after the loggable object has been externalized, but possibly before the IO operation is complete. When the object's external representation is safely on disk, the object's onDisk() callback method is invoked. The object MIGHT NOT BE ON DISK by the time store() returns. This allows the current thread to be available for reuse while waiting for disk I/O.

  Transaction log file store operations are ordered: if one object is stored before another, it will be placed in the log first, and will be processed in the same order during recovery.

  The caller is responsible for releasing the stored object, by calling this class's release() method, at a later time.

  An object should not be stored more than once.

  Parameters:
    `obj` - object to store in transaction log

### release

    void release(TransactionLoggable obj)

  Release an object previously stored.

  Once an object previously stored in the transaction log is released, the TransactionLogger is no longer responsible for processing that object during recovery.

  Failure to release objects may result in unnecessarily large transaction log files and long recovery times.

  An object may need to be released more than once, for example both before and after recovery. Any extra releases are ignored.

  Parameters:
    `obj` - object to release from transaction log memory

### checkpoint

    void checkpoint()

  Perform a log checkpoint operation.

  A checkpoint operation releases unneeded disk space and helps improve crash recovery time. It is recommended to perform a checkpoint before a controlled system shutdown.

  The caller's thread is blocked until all objects previously stored in the transaction log have been written to disk. Note that this might involve more than one disk-level checkpoint. A tlog.store() followed by tlog.checkpoint() sequence should guarantee the object is actually on disk, even if the store() operation put it in the pending buffer.

### getMigratedCoordinatorURL

    String getMigratedCoordinatorURL()

### getInitialRecoveredTransactionTotalCount

    int getInitialRecoveredTransactionTotalCount()

### getRecoveredTransactionCompletionCount

    int getRecoveredTransactionCompletionCount()

### hasTransactionLogRecords

    boolean hasTransactionLogRecords()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD