public class DatabaseConnectionSet
extends java.lang.Object
DatabaseConnectionSet
the class provides the functions for database connection pooling.Modifier and Type | Field and Description |
---|---|
int |
errCode
error code while initialisation.
|
java.lang.String |
errMess
error message while initialisation.
|
Constructor and Description |
---|
DatabaseConnectionSet(DatabaseSystem databaseSystem,
boolean debug)
The constructor
DatabaseConnectionSet creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
DatabaseConnection |
conn()
The method
conn gets a connection of the current database system. |
void |
connClose(java.sql.Connection conn)
The method
connClose closes the current connection. |
void |
connReleaseAll()
Deprecated.
since 1.0.
|
long |
getConnectionCount()
get field: the current number of connections of this pool.
|
DatabaseSystem |
getDatabaseSystem()
get field: the current object of the database system.
|
java.lang.String |
outToLog(java.lang.String method,
java.lang.String message)
The method
outToLog logs the status of the connectopn maintenance to the log file of the database system. |
public int errCode
public java.lang.String errMess
public DatabaseConnectionSet(DatabaseSystem databaseSystem, boolean debug)
DatabaseConnectionSet
creates a new instance(object) of the class.databaseSystem
- the current database system.debug
- debug onpublic DatabaseSystem getDatabaseSystem()
public long getConnectionCount()
public DatabaseConnection conn() throws java.lang.Exception
conn
gets a connection of the current database system.java.lang.Exception
- if error.public void connReleaseAll()
connReleaseAll
releases all connections to the current database system.public void connClose(java.sql.Connection conn)
connClose
closes the current connection.conn
- the current connection.public java.lang.String outToLog(java.lang.String method, java.lang.String message)
outToLog
logs the status of the connectopn maintenance to the log file of the database system.method
- the current method.message
- the current message.