Inheritance diagram for org.openmobileis.common.util.database.JdbcPoolManagerDB:
It allows to connect a database by giving an url and a jdbc driver It establishes the connection, prepare statement and manage the application queries (using pool connections) All the DB parameters are contained in the database.properties file which is read by the InitFactories class.
Definition at line 53 of file JdbcPoolManagerDB.java.
Public Member Functions | |
JdbcPoolManagerDB () | |
* Connect to the database | |
JdbcPoolManagerDB (String alias, String srvdriver, String dbserver, String srvlogin, String srvpassword, int monitorinterval, int maxconnection, int idltimeout, int checkouttimeout, int maxcheckout, String shutdownquery) | |
void | connect () throws ServiceException |
void | disconnect () |
disconnect() method allows to close the database | |
boolean | isConnected () |
Connection | getConnection () throws java.sql.SQLException |
getConnection() return a free connection or null if all the connections are used after a given time out | |
void | garbageOpenedConnection () |
org.openmobileis.common.util.database.JdbcPoolManagerDB.JdbcPoolManagerDB | ( | ) |
* Connect to the database
monitor | interval : how many seconds to wait between reaping connections in the pool. | |
String | driver : jdbc driver bridge (ex: "com.imaginary.sql.msql.MsqlDriver") | |
String | server url : Name of the database "jdbc:msql:databaseName" | |
String | login | |
String | password | |
int | maximum available connections | |
idle | timeout : seconds a connection can be idle before it is closed | |
int | checkout timeout : seconds a connection can be checked out by a thread before it is returned back to the pool | |
int | maxCheckout : number of times a connection can be re-used before connection to database is closed and re-opened | |
String | shutdown query called before closing database. For instance, hsql need to query "shutdown compact" explicitly before closing (can be null) |
IOException | for log file | |
Exception | : Impossible to find the database or to find the driver |
Definition at line 88 of file JdbcPoolManagerDB.java.
void org.openmobileis.common.util.database.JdbcPoolManagerDB.disconnect | ( | ) | [virtual] |
disconnect() method allows to close the database
None |
SQLException |
Implements org.openmobileis.common.util.database.ManagerDB.
Definition at line 163 of file JdbcPoolManagerDB.java.
Connection org.openmobileis.common.util.database.JdbcPoolManagerDB.getConnection | ( | ) | throws java.sql.SQLException [virtual] |
getConnection() return a free connection or null if all the connections are used after a given time out
: | None |
: | None |
Implements org.openmobileis.common.util.database.ManagerDB.
Definition at line 208 of file JdbcPoolManagerDB.java.
References org.openmobileis.common.util.database.JdbcPoolManagerDB.isConnected().