org.glite.security.voms.database.connection
Class CurrentConnection

java.lang.Object
  extended byorg.glite.security.voms.database.connection.CurrentConnection

public final class CurrentConnection
extends java.lang.Object

A simple class for accessing the database connection associated with the current thread.


Field Summary
static org.apache.log4j.Logger log
          Logger.
 
Method Summary
static void clear()
           
static ClientTransaction get()
           
static Update getUpdate()
           
static void set(ClientTransaction t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final transient org.apache.log4j.Logger log
Logger.

Method Detail

get

public static ClientTransaction get()
                             throws GeneralDatabaseException
Returns:
the database connection associated with the current thread.
Throws:
GeneralDatabaseException - if there is no such database connection.

getUpdate

public static Update getUpdate()
                        throws GeneralDatabaseException
Returns:
the database connection associated with the current thread, for update.
Throws:
GeneralDatabaseException - if there is no such database connection, or if it is not for update.

set

public static void set(ClientTransaction t)
                throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

clear

public static void clear()