com.atlassian.greenhopper.util.database
Class DatabaseConnectionProvider

java.lang.Object
  extended by com.atlassian.greenhopper.util.database.DatabaseConnectionProvider

public class DatabaseConnectionProvider
extends java.lang.Object

This class provides access to a Connection instance.


Method Summary
 void closeConnection()
          Closes the managed Connection.
protected  void finalize()
           
 java.sql.Connection getConnection()
          Returns the managed Connection.
static DatabaseConnectionProvider instance()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static DatabaseConnectionProvider instance()

getConnection

public java.sql.Connection getConnection()
Returns the managed Connection. If no connection is currently managed, one will be retrieved. The returned connection shouldn't be closed as it might be reused within the thread.

Returns:

closeConnection

public void closeConnection()
Closes the managed Connection. If no connection is managed, noop


finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright © 2007-2014 Atlassian. All Rights Reserved.