Enhydra 5.1 API

com.lutris.appserver.server.sql.informix
Class InformixDBTransaction

java.lang.Object
  |
  +--com.lutris.appserver.server.sql.standard.StandardDBTransaction
        |
        +--com.lutris.appserver.server.sql.informix.InformixDBTransaction
All Implemented Interfaces:
DBTransaction

public class InformixDBTransaction
extends StandardDBTransaction

Informix implementation of SQL database transaction.

Since:
LBS1.8
Version:
$Revision: 1.2 $
Author:
Kyle Clark

Field Summary
protected  InformixDBConnection conn
          The connection to the informix database.
 
Fields inherited from class com.lutris.appserver.server.sql.standard.StandardDBTransaction
databaseName
 
Constructor Summary
  InformixDBTransaction()
          Public constructor.
protected InformixDBTransaction(InformixDBConnection conn)
          Private constructor.
  InformixDBTransaction(java.lang.String dbName)
          Public constructor.
 
Method Summary
 void setTransactionTimeout(int seconds)
          Set transaction time out.
 
Methods inherited from class com.lutris.appserver.server.sql.standard.StandardDBTransaction
commit, delete, finalize, getDatabaseName, getDO, getDO, handleException, insert, logDebug, release, rollback, setDatabaseName, update
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

protected InformixDBConnection conn
The connection to the informix database.

Constructor Detail

InformixDBTransaction

protected InformixDBTransaction(InformixDBConnection conn)
                         throws java.sql.SQLException
Private constructor. Used if connection is already known.

Parameters:
conn - The database connection to use.
Throws:
java.sql.SQLException - If a database access error occurs.

InformixDBTransaction

public InformixDBTransaction()
                      throws java.sql.SQLException,
                             DatabaseManagerException
Public constructor. Establishes a connection with the default logical database. The connection manager must have been initialized with a default logical database name.

Throws:
java.sql.SQLException - If a database access error occurs.
DatabaseManagerException - If the default logical database wasn't initialized in the Database Manager.
java.lang.ClassCastException - If the default database manager doesn't allocate connections of type InformixDBConnection.
See Also:
DatabaseManager#setDefaultDatabase

InformixDBTransaction

public InformixDBTransaction(java.lang.String dbName)
                      throws java.sql.SQLException,
                             DatabaseManagerException
Public constructor. Establishes a connection with the specified logical database name.

Parameters:
dbName - Logical database name to access.
Throws:
java.sql.SQLException - If a database access error occurs.
DatabaseManagerException - If a nonexistent logical database name is supplied.
Method Detail

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws java.sql.SQLException
Set transaction time out. If a transaction blocks, then it will only block as long as specified here.

Parameters:
seconds - The amount of time to block in seconds. If less than zero then blocks indefinitly.
Throws:
java.sql.SQLException - if a database error occurs.

Enhydra 5.1 API