| |
|
| java.lang.Object org.ow2.easybeans.tests.common.db.DBManager
DBManager | public class DBManager implements DataSource,Serializable(Code) | | Manages the connection with the database. It is make possible to open and
close connections with the database and also, use statements.
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro |
Field Summary | |
final public static Integer | JDBC_DRIVER A Constant that holds the name of the JDBC driver class. | final public static Integer | LOGIN Constant that holds the user login used to connect with the database. | final public static Integer | PASSWD Constant that holds the user passwd used to connect with the database. | final public static Integer | URL Constant that holds the database URL. |
Constructor Summary | |
public | DBManager(Hashtable<Integer, String> dbParameters) Creates a instance of DBManager.Loads the database driver and sets the
parameters. |
JDBC_DRIVER | final public static Integer JDBC_DRIVER(Code) | | A Constant that holds the name of the JDBC driver class.
|
LOGIN | final public static Integer LOGIN(Code) | | Constant that holds the user login used to connect with the database.
|
PASSWD | final public static Integer PASSWD(Code) | | Constant that holds the user passwd used to connect with the database.
|
URL | final public static Integer URL(Code) | | Constant that holds the database URL.
|
getConnection | public Connection getConnection(String username, String password) throws SQLException(Code) | | Starts the connection with the database.
Parameters: username - the name used to connect with the database. Parameters: password - the user password. the datasource connection. throws: SQLException - if a database access error occurs |
setLoginTimeout | public void setLoginTimeout(int seconds) throws SQLException(Code) | | Not used.
Parameters: seconds - not used throws: SQLException - if a database access error occurs |
|
|
|