| |
|
| java.lang.Object net.myvietnam.mvncore.db.DBUtils2
DBUtils2 | final public class DBUtils2 (Code) | | A database utility class to handle all the database stuffs
in the MyVietnam framework
|
closeAllConnections | public static boolean closeAllConnections()(Code) | | Close all the connections that currently in the pool
This method could be used to refresh the database connection
true if the pool is empty and balancefalse if the pool has returned some connection to outside |
closeConnection | public static void closeConnection(Connection connection)(Code) | | Use this method to return the connection to the connection pool
Do not use this method to close connection that is not from
the connection pool
Parameters: connection - : the connection that needs to be returned to the pool |
getConnection | public static Connection getConnection() throws SQLException(Code) | | Get a connection from the connection pool. The returned connection
must be closed by calling DBUtils2.closeConnection()
: a new connection from the pool if succeed throws: SQLException - : if cannot get a connection from the pool |
getDatabaseType | public static int getDatabaseType()(Code) | | Use this method to get the database type. This method will automatically
detect the database type. You could override this value by modifying
the value in mvncore_db_DBOptions.properties
: the database type |
|
|
|