macaw.persistenceLayer.production
Class SQLConnectionManager

java.lang.Object
  extended by macaw.persistenceLayer.production.SQLConnectionManager

public class SQLConnectionManager
extends java.lang.Object

A class designed specifically to manage SQL connection pooling for the ProductionCurationService and ProductionRetrievalService and


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
SQLConnectionManager(SessionProperties sessionProperties)
           
 
Method Summary
 java.sql.Connection getConnection()
           
 int getNumberOfConnections()
           
 java.sql.Connection getSQLConnection()
          This method exists solely to help make it easier to use an SQL connection manager within the SQLUserManager class.
 void releaseConnection(java.sql.Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLConnectionManager

public SQLConnectionManager(SessionProperties sessionProperties)
                     throws MacawException
Throws:
MacawException
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws MacawException
Throws:
MacawException

getSQLConnection

public java.sql.Connection getSQLConnection()
                                     throws java.lang.Exception
This method exists solely to help make it easier to use an SQL connection manager within the SQLUserManager class. The method was developed as part of an effort to cleanly separate its concerns from a service that would help validate end-users.

Throws:
java.sql.SQLException
java.lang.Exception

releaseConnection

public void releaseConnection(java.sql.Connection connection)

getNumberOfConnections

public int getNumberOfConnections()