|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.commons.jdbc.ConnectionManager
public class ConnectionManager
Entry point for accessing JDBC connections in deegree that are defined in JDBC configuration files.
Configuration of JDBC connections used in deegree is based on simple string identifiers: each configured JDBC connection has a unique identifier. This class allows the retrieval of connections based on their identifier.
Constructor Summary | |
---|---|
ConnectionManager()
|
Method Summary | |
---|---|
static void |
addConnection(JDBCConnection jaxbConn,
java.lang.String connId)
Adds a connection pool from the given pool definition. |
static void |
addConnection(java.lang.String connId,
java.lang.String url,
java.lang.String user,
java.lang.String password,
int poolMinSize,
int poolMaxSize)
Adds a connection pool as specified in the parameters. |
static void |
addConnection(java.net.URL jdbcConfigUrl,
java.lang.String connId)
Adds the connection pool defined in the given file. |
static void |
destroy()
|
static java.sql.Connection |
getConnection(java.lang.String id)
Returns a connection from the connection pool with the given id. |
static java.util.Set<java.lang.String> |
getConnectionIds()
|
static void |
init(java.io.File jdbcDir)
Initializes the ConnectionManager by loading all JDBC pool configurations from the given directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionManager()
Method Detail |
---|
public static void init(java.io.File jdbcDir)
ConnectionManager
by loading all JDBC pool configurations from the given directory.
jdbcDir
- public static void destroy()
public static java.sql.Connection getConnection(java.lang.String id) throws java.sql.SQLException
id
- id of the connection pool
java.sql.SQLException
- if the connection pool is unknown or a SQLException occurs creating the connectionpublic static void addConnection(java.net.URL jdbcConfigUrl, java.lang.String connId) throws javax.xml.bind.JAXBException
jdbcConfigUrl
- connId
-
javax.xml.bind.JAXBException
public static void addConnection(JDBCConnection jaxbConn, java.lang.String connId)
jaxbConn
- connId
- public static void addConnection(java.lang.String connId, java.lang.String url, java.lang.String user, java.lang.String password, int poolMinSize, int poolMaxSize)
connId
- url
- user
- password
- poolMinSize
- poolMaxSize
- public static java.util.Set<java.lang.String> getConnectionIds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |