com.groiss.store
Class DBConnPool

java.lang.Object
  extended by com.groiss.store.DBConnPool
All Implemented Interfaces:
Lifecycle, Service

public class DBConnPool
extends java.lang.Object
implements Service

This class maintains a pool of database connections.


Constructor Summary
DBConnPool()
           
 
Method Summary
static boolean doLogDBSessionId()
           
static java.sql.Connection getConnection()
          The method returns a database connection.
static int getConnectionCount()
           
static int getGlobalQueryTimeout()
           
static int getQueryTimeout()
           
 boolean isRunning()
          Ask the object if it has been started
 void reconfigure()
          Reconfigure gives the service the chance to react on configuration changes.
static void setQueryTimeout(int s)
           
 void shutdown()
          This method is called on shutdown.
 void startup()
          This method is called when the object is "started".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBConnPool

public DBConnPool()
Method Detail

startup

public void startup()
Description copied from interface: Lifecycle
This method is called when the object is "started".

Specified by:
startup in interface Lifecycle

shutdown

public void shutdown()
Description copied from interface: Lifecycle
This method is called on shutdown.

Specified by:
shutdown in interface Lifecycle

isRunning

public boolean isRunning()
Description copied from interface: Service
Ask the object if it has been started

Specified by:
isRunning in interface Service
Returns:
true if running.

reconfigure

public void reconfigure()
Description copied from interface: Service
Reconfigure gives the service the chance to react on configuration changes. Whenever the configuration is changed the ServiceManager calls this method for all managed services.

Specified by:
reconfigure in interface Service

getGlobalQueryTimeout

public static int getGlobalQueryTimeout()

getConnection

public static java.sql.Connection getConnection()
The method returns a database connection. Called in the same transaction, the method will always return the same connection.

Returns:
a database connection

getConnectionCount

public static int getConnectionCount()

setQueryTimeout

public static void setQueryTimeout(int s)

getQueryTimeout

public static int getQueryTimeout()

doLogDBSessionId

public static boolean doLogDBSessionId()


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.