DODS 6.5 API

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

java.lang.Object
  extended bycom.lutris.appserver.server.sql.standard.StandardDBConnection
      extended bycom.lutris.appserver.server.sql.informix.InformixDBConnection
All Implemented Interfaces:
DBConnection, ExtendedDBConnection

public class InformixDBConnection
extends StandardDBConnection

An Informix database connection.

Since:
LBS1.7
Version:
$Revision: 1.1 $
Author:
Kyle Clark
See Also:
DBConnection

Field Summary
protected  InformixLogicalDatabase logicalDatabase
          The logical database for this connection.
 
Fields inherited from class com.lutris.appserver.server.sql.standard.StandardDBConnection
allocated, closed, connection, connectionAllocator, connectionEnterPoolTime, connectionUsageCounter, currentStmt, curtime, dropConnection, dropped, generation, id, logging, maxPreparedStmts, nextId, password, preparedStmtCache, reset, url, user
 
Constructor Summary
protected InformixDBConnection(InformixConnectionAllocator connectionAllocator, java.lang.String url, java.lang.String user, java.lang.String password, int maxPreparedStatements, boolean logging, int generation)
          Create a connection to an Informix database.
 
Method Summary
 void setLockModeToWait(boolean on)
          Specify if you prefer to wait for locks instead of generating errors.
 void setLockModeToWait(int seconds)
          Specify if you prefer to wait for locks for the specified amount of time before an exception is thrown.
 
Methods inherited from class com.lutris.appserver.server.sql.standard.StandardDBConnection
allocate, allocatedCheck, close, closedCheck, commit, drop, execute, executeQuery, executeQuery, executeUpdate, executeUpdate, getConnection, getConnectionEnterPoolTime, getConnectionUsageCounter, getDatabaseName, getGeneration, getMaxPreparedStmts, getResultSetConcurrency, getResultSetType, getUrl, getUser, handleException, incrRequestCount, isClosed, isDroped, isMarkedForDrop, logDebug, logDebug, prepareCall, prepareStatement, prepareStatement, release, reset, resetCheck, rollback, setAutoCommit, setConnectionEnterPoolTime, setConnectionUsageCounter, validate, warningCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logicalDatabase

protected InformixLogicalDatabase logicalDatabase
The logical database for this connection.

Constructor Detail

InformixDBConnection

protected InformixDBConnection(InformixConnectionAllocator connectionAllocator,
                               java.lang.String url,
                               java.lang.String user,
                               java.lang.String password,
                               int maxPreparedStatements,
                               boolean logging,
                               int generation)
                        throws java.sql.SQLException
Create a connection to an Informix database.

Parameters:
url - JDBC URL of database.
user - SQL user name.
password - SQL password.
maxPreparedStatements - Maximum number of preparse statements. A value of less than zero queries JDBC for the value.
connectionAllocator - The connection allocator that this connection belongs to.
logging - Specifying true enables SQL logging.
generation - A generation number used to drop old connection when they are released.
Throws:
java.sql.SQLException - If a connection can't be established.
Method Detail

setLockModeToWait

public void setLockModeToWait(boolean on)
                       throws java.sql.SQLException
Specify if you prefer to wait for locks instead of generating errors.

Parameters:
on - True if you prefer to wait, false otherwise.
Throws:
java.sql.SQLException - If a database access error occurs.

setLockModeToWait

public void setLockModeToWait(int seconds)
                       throws java.sql.SQLException
Specify if you prefer to wait for locks for the specified amount of time before an exception is thrown.

Parameters:
seconds - The number of seconds to wait. If seconds is == 0 the waiting is disabled. If seconds is less than 0 then wait indefinitly.
Throws:
java.sql.SQLException - If a database access error occurs.

DODS 6.5 API