|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moremotion.util.JdbcConnection
public class JdbcConnection
This class provides static methods for obtaining Data Base Connections.
If JNDI Datasource parameter is specified, either as parameter or in the Data Source Configuration, the methods first try to get the connection through JNDI, if they fail then they load the Jdbc Driver Class and gets the connection from the Driver Manager with the parameters defined in the RelDB Datasource.
Constructor Summary | |
---|---|
JdbcConnection()
|
Method Summary | |
---|---|
static java.sql.Connection |
getConnection(MoreMotionRequest request,
Config config)
Returns a Jdbc connection. |
static java.sql.Connection |
getConnection(MoreMotionRequest request,
java.lang.String conName)
Returns a Jdbc Connection. |
static java.sql.Connection |
getConnection(java.lang.String conName)
Returns a JdbcConnection connection. |
static void |
releaseConnection(java.sql.Connection conn)
|
static void |
releaseRequestConnections(MoreMotionRequest request)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcConnection()
Method Detail |
---|
public static java.sql.Connection getConnection(java.lang.String conName) throws JdbcConnectionException
conName
- The name of the jdbcConnection as defined in configuration.
java.lang.Exception
- if the cannot be obtained.
JdbcConnectionException
public static java.sql.Connection getConnection(MoreMotionRequest request, java.lang.String conName) throws JdbcConnectionException
request
- The MoreMotionRequest objectconName
- The name of the jdbcConnection as defined in configuration.
java.lang.Exception
- if no connection can be obtained.
JdbcConnectionException
public static java.sql.Connection getConnection(MoreMotionRequest request, Config config) throws JdbcConnectionException
request
- The MoreMotionRequest objectconfig
- Config object
java.lang.Exception
- if the cannot be obtained.
JdbcConnectionException
public static void releaseConnection(java.sql.Connection conn)
public static void releaseRequestConnections(MoreMotionRequest request) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |