com.lutris.appserver.server.sql.informix
Class InformixDBConnection
java.lang.Object
|
+--com.lutris.appserver.server.sql.standard.StandardDBConnection
|
+--com.lutris.appserver.server.sql.informix.InformixDBConnection
- public class InformixDBConnection
- extends StandardDBConnection
An Informix database connection.
- Since:
- LBS1.7
- Version:
- $Revision: 1.9.12.1 $
- See Also:
DBConnection
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,
close,
commit,
execute,
executeQuery,
executeQuery,
executeUpdate,
executeUpdate,
getConnection,
getGeneration,
getUrl,
getUser,
handleException,
incrRequestCount,
logDebug,
logDebug,
prepareCall,
prepareStatement,
release,
reset,
rollback,
setAutoCommit,
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.