com.lutris.appserver.server.sql.datasource
Class DataSourceDBConnection
java.lang.Object
com.lutris.appserver.server.sql.ExtendedDBConnection
com.lutris.appserver.server.sql.datasource.DataSourceDBConnection
- All Implemented Interfaces:
- DBConnection
public class DataSourceDBConnection
- extends ExtendedDBConnection
Field Summary |
long |
curtime
|
protected javax.sql.DataSource |
ds
|
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 |
DataSourceDBConnection(ConnectionAllocator connectionAllocatorObj,
javax.sql.DataSource dataSource,
int maxPreparedStatements,
boolean logging,
int generation)
Initialize the connection to a database. |
DataSourceDBConnection(ConnectionAllocator connectionAllocatorObj,
java.lang.String url,
java.lang.String user,
java.lang.String password,
int maxPreparedStatements,
boolean logging,
int generation)
Initialize the connection to a database. |
Method Summary |
void |
release()
Return this connection to its allocator. |
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 |
curtime
public long curtime
ds
protected javax.sql.DataSource ds
DataSourceDBConnection
public DataSourceDBConnection(ConnectionAllocator connectionAllocatorObj,
java.lang.String url,
java.lang.String user,
java.lang.String password,
int maxPreparedStatements,
boolean logging,
int generation)
throws java.sql.SQLException
- Initialize the connection to a database.
- Parameters:
url
- JDBC URL of database.user
- SQL user name.password
- SQL password.connectionAllocatorObj
- The connection allocator that this connection belongs
to.maxPreparedStatements
- Maximum number of preparse statements. a value of less
than zero queries JDBC for the value.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.
DataSourceDBConnection
public DataSourceDBConnection(ConnectionAllocator connectionAllocatorObj,
javax.sql.DataSource dataSource,
int maxPreparedStatements,
boolean logging,
int generation)
throws java.sql.SQLException
- Initialize the connection to a database.
- Parameters:
connectionAllocatorObj
- The connection allocator that this connection belongs
to.dataSource
- DataSource object.maxPreparedStatements
- Maximum number of preparse statements. a value of less
than zero queries JDBC for the value.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.
release
public void release()
- Return this connection to its allocator. This object should not be used after
calling this function.
- Specified by:
release
in interface DBConnection
- Specified by:
release
in class ExtendedDBConnection