uk.org.ogsadai.dataresource.conx
Class SimpleJDBCConnectionManager

java.lang.Object
  |
  +--uk.org.ogsadai.dataresource.conx.ConnectionManager
        |
        +--uk.org.ogsadai.dataresource.conx.SimpleJDBCConnectionManager
All Implemented Interfaces:
JDBCConnectionManager
Direct Known Subclasses:
SimpleJDBCConnectionManagerDerby

public class SimpleJDBCConnectionManager
extends ConnectionManager
implements JDBCConnectionManager

A class to implement a JDBC ConnectionManager Doesn't include fancy thing slike pooling connections


Field Summary
 
Fields inherited from class uk.org.ogsadai.dataresource.conx.ConnectionManager
mDriverClass, mLog, mRoleMapClass, mRoleMapper, mURI
 
Constructor Summary
SimpleJDBCConnectionManager(ConnectionConfig config)
          The constructor calls the super-class constructor and thhen attempts to load the database driver class and configure role mapping.
 
Method Summary
 java.sql.Connection getConnection(java.lang.String credentials)
          Responds with a connection to the database
 java.lang.String getDriverClass()
          Returns the driver class of the ConnectionManager In certain circumstances hacks are and may be required based upon the driver used.
 void returnConnection(java.sql.Connection con)
          Returns a connection Allows pooling of connections or could simple just result in connection being closed
 
Methods inherited from class uk.org.ogsadai.dataresource.conx.ConnectionManager
mapCertificate, setRoleMapsFile, setupRoleMapping, updateRoleMaps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleJDBCConnectionManager

public SimpleJDBCConnectionManager(ConnectionConfig config)
                            throws CoreSystemException,
                                   CoreUserException
The constructor calls the super-class constructor and thhen attempts to load the database driver class and configure role mapping.

See Also:
ConnectionManager
Method Detail

getConnection

public java.sql.Connection getConnection(java.lang.String credentials)
                                  throws CoreSystemException,
                                         CoreUserException,
                                         AuthorisationException
Description copied from interface: JDBCConnectionManager
Responds with a connection to the database

Specified by:
getConnection in interface JDBCConnectionManager
CoreSystemException
CoreUserException
AuthorisationException
See Also:
JDBCDataResource

returnConnection

public void returnConnection(java.sql.Connection con)
                      throws CoreSystemException
Description copied from interface: JDBCConnectionManager
Returns a connection Allows pooling of connections or could simple just result in connection being closed

Specified by:
returnConnection in interface JDBCConnectionManager
CoreSystemException
See Also:
JDBCDataResource

getDriverClass

public java.lang.String getDriverClass()
Returns the driver class of the ConnectionManager In certain circumstances hacks are and may be required based upon the driver used. This method allows an activity to access the driver class name

Specified by:
getDriverClass in interface JDBCConnectionManager