com.lutris.appserver.server.sql.informix
Class InformixDBConnection
java.lang.Object
com.lutris.appserver.server.sql.ExtendedDBConnection
com.lutris.appserver.server.sql.standard.StandardDBConnection
com.lutris.appserver.server.sql.informix.InformixDBConnection
- All Implemented Interfaces:
- DBConnection
public class InformixDBConnection
- extends StandardDBConnection
An Informix database connection.
- Since:
- LBS1.7
- Version:
- $Revision: 1.1 $
- Author:
- Kyle Clark
- See Also:
DBConnection
| Fields inherited from class com.lutris.appserver.server.sql.ExtendedDBConnection |
allocated, closed, connection, connectionAllocator, connectionEnterPoolTime, connectionUsageCounter, currentStmt, dropConnection, dropped, generation, id, logging, maxPreparedStmts, nextId, password, preparedStmtCache, prepareStatementCache, psCacheLatency, 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.ExtendedDBConnection |
allocate, allocatedCheck, allocateObjectId, 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, prepareStatement, 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 |
logicalDatabase
protected InformixLogicalDatabase logicalDatabase
- The logical database for this connection.
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.
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.