Module org.firebirdsql.jaybird
Package org.firebirdsql.jaybird.xca

# Class FBLocalTransaction

java.lang.Object
org.firebirdsql.jaybird.xca.FBLocalTransaction

public final class FBLocalTransaction extends Object
The class `FBLocalTransaction` represent a local, not distributed, transaction. A flag is used to distinguish the current functionality. This class works by delegating the operations to the internal implementation of the XAResource functionality in FBManagedConnection.

Author:
  David Jencks

## Method Summary

Modifier and Type
Method
Description
`void`
`begin()`
Begin a local transaction.
`void`
`begin(String sql)`
`void`
`commit()`
Commit a local transaction.
`boolean`
`inTransaction()`
Check if managed connection is currently participating in transaction.
`void`
`rollback()`
Rollback a local transaction.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### inTransaction

public boolean inTransaction() throws SQLException
Check if managed connection is currently participating in transaction.

Returns:
  `true` if managed connection is participating in transaction.
Throws:
  `SQLException` - if operation cannot be completed.

### begin

public void begin() throws SQLException
Begin a local transaction.

Throws:
  `SQLException` - generic exception if operation fails

### begin

public void begin(String sql) throws SQLException

Throws:
  `SQLException`

### commit

public void commit() throws SQLException
Commit a local transaction.

Throws:
  `SQLException` - generic exception if operation fails

### rollback

public void rollback() throws SQLException
Rollback a local transaction.

Throws:
  `SQLException` - generic exception if operation fails