|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fuse.storage.sql.DatabaseConnectionManager
public class DatabaseConnectionManager
DatabaseConnectionManager, singleton. Use getInstance() to get an instance of this
Field Summary | |
---|---|
protected int |
createdConnections
|
protected java.sql.Driver |
driver
|
protected static DatabaseConnectionManager |
instance
|
protected java.lang.Object |
lock
|
protected int |
maxConnections
|
protected java.lang.String |
password
|
protected java.util.Properties |
props
|
protected java.lang.String |
url
|
protected java.lang.String |
username
|
Method Summary | |
---|---|
protected java.sql.Connection |
createNewConnection()
Creates a new connection, using a username and password from props. |
void |
freeConnection(java.sql.Connection conn)
Return used connection back |
java.sql.Connection |
getConnection()
Returns a new connection |
static DatabaseConnectionManager |
getInstance()
Returns a singleton instance of pool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static DatabaseConnectionManager instance
protected java.util.Properties props
protected java.sql.Driver driver
protected int createdConnections
protected int maxConnections
protected java.lang.String url
protected java.lang.String username
protected java.lang.String password
protected java.lang.Object lock
Method Detail |
---|
public static DatabaseConnectionManager getInstance()
public void freeConnection(java.sql.Connection conn)
public java.sql.Connection getConnection()
protected java.sql.Connection createNewConnection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |