DODS 7.6 API

com.lutris.appserver.server.sql
Class StandardDatabaseManager

java.lang.Object
  extended by com.lutris.appserver.server.sql.StandardDatabaseManager
All Implemented Interfaces:
DatabaseManager, DriverSpecificConstants, CacheConstants

public class StandardDatabaseManager
extends java.lang.Object
implements DatabaseManager, CacheConstants, DriverSpecificConstants

The standard database manager implementation. A database manager manages logical databases. It provides a single object from which database connections, object ids (OIDs), transactions and queries can be obtained. The configuration file specifies what logical database to create.

The configuration data is specified as follows:

For each logical database, there is a set of entry names in the form DatabaseManager.DB.dbname. Where dbname is one of the listed logical databases.

DatabaseManager.DB.dbname.ClassType - This is an optional field which specifies the class of the logical database implementation or a symbolic name if one on the standard types are selected. This is recommended because although JDBC abstracts the data access, the functionality of each database is slightly different and this parameter allows for optimised usage. The following are standard types:

Note that since a single SQL user is used to access the database by the entire application, connections maybe kept open, thus saving this overhead on each request. Connections are opened as desired until the maximum configured is reached.

If a thread needs to process a transaction, it requests a connection. If none are available, then a new connection is created up to the configured maximum. A thread is queued waiting for a connection to be returned if a new connection can't be created.

Note also that multiple logical names may map to the same actual database, making it easy to migrate databases if necessary and to provide access through multiple users.

Since:
LBS1.8
Version:
$Revision: 1.27 $
Author:
Paul Morgan, Kyle Clark

Field Summary
protected  java.lang.String confDir
           
protected  Config config
           
protected  boolean debug
          Controls debugging for Transactions and Queries.
protected  java.lang.String defaultDB
           
protected  DODSMBeans dodsMBeans
           
 
Fields inherited from interface org.enhydra.dods.cache.CacheConstants
COMPLEX_QUERY_CACHE, DATA_CACHE, DATA_CACHING, DEFAULT_All_READONLY, DEFAULT_APP_NAME, DEFAULT_ASYNCH_LOAD_PRIORITY, DEFAULT_ASYNCH_LOAD_THREAD_NUM, DEFAULT_AUTO_SAVE, DEFAULT_AUTO_SAVE_CREATE_VIRGIN, DEFAULT_AUTO_WRITE, DEFAULT_CACHE_PERCENTAGE, DEFAULT_CACHE_PERSISTENCE_ON_DISABLE_CACHING, DEFAULT_CACHE_PERSISTENCE_ON_SHUTDOWN, DEFAULT_CASE_SENSITIVE, DEFAULT_DEADLOCK_READ_TIME, DEFAULT_DEADLOCK_RETRY_NUMBER, DEFAULT_DEFAULT_FETCH_SIZE, DEFAULT_DELETE_CHECK_VERSION, DEFAULT_DODS_CACHE_FACTORY, DEFAULT_FULL_CACHE_COUNT_LIMIT, DEFAULT_INCREMENT_VERSIONS, DEFAULT_INITIAL_ALL_CACHES, DEFAULT_INITIAL_CACHE_FETCH_SIZE, DEFAULT_INITIAL_CONDITION, DEFAULT_INITIAL_DS_CACHE_SIZE, DEFAULT_LAZY_LOADING, DEFAULT_MAX_CACHE_SIZE, DEFAULT_MAX_COMPLEX_QUERY_CACHE_SIZE, DEFAULT_MAX_EXECUTE_TIME, DEFAULT_MAX_EXECUTE_TIME_CACHE_INIT, DEFAULT_MAX_MULTI_JOIN_QUERY_CACHE_SIZE, DEFAULT_MAX_SIMPLE_QUERY_CACHE_SIZE, DEFAULT_QUERY_TIME_LIMIT_CACHE_INIT, DEFAULT_QUERY_TIMEOUT, DEFAULT_QUERY_TIMEOUT_CACHE_INIT, DEFAULT_READONLY, DEFAULT_RESERVE_FACTOR, DEFAULT_SELECT_OIDS, DEFAULT_SIMPLE_CACHE_ROW_COUNT_LIMIT, DEFAULT_SYNCH_LOAD_ROW_COUNT_LIMIT, DEFAULT_TRANSACTION_CACHES, DEFAULT_TRANSACTION_CHECK, FULL_CACHE_COUNT_LIMIT, MULTI_JOIN_QUERY_CACHE, PARAMNAME_ALL_READ_ONLY, PARAMNAME_APP_NAME, PARAMNAME_ASYNCH_LOAD_PRIORITY, PARAMNAME_ASYNCH_LOAD_THREAD_NUM, PARAMNAME_AUTO_SAVE, PARAMNAME_AUTO_SAVE_CREATE_VIRGIN, PARAMNAME_AUTO_WRITE, PARAMNAME_CACHE_PERCENTAGE, PARAMNAME_CACHE_PERSISTENCE_ON_DISABLE_CACHING, PARAMNAME_CACHE_PERSISTENCE_ON_SHUTDOWN, PARAMNAME_CACHE_PERSISTENCE_ROOT, PARAMNAME_CASE_SENSITIVE, PARAMNAME_DEADLOCK_READ_TIME, PARAMNAME_DEADLOCK_RETRY_NUMBER, PARAMNAME_DEFAULT_FETCH_SIZE, PARAMNAME_DELETE_CHECK_VERSION, PARAMNAME_DODS_CACHE_FACTORY, PARAMNAME_INCREMENT_VERSIONS, PARAMNAME_INITIAL_ALL_CACHES, PARAMNAME_INITIAL_CACHE_FETCH_SIZE, PARAMNAME_INITIAL_CONDITION, PARAMNAME_INITIAL_DS_CACHE_SIZE, PARAMNAME_LAZY_LOADING, PARAMNAME_MAX_CACHE_SIZE, PARAMNAME_MAX_COMPLEX_CACHE_SIZE, PARAMNAME_MAX_EXECUTE_TIME, PARAMNAME_MAX_EXECUTE_TIME_CACHE_INIT, PARAMNAME_MAX_MULTI_JOIN_CACHE_SIZE, PARAMNAME_MAX_SIMPLE_CACHE_SIZE, PARAMNAME_QUERY_TIME_LIMIT_CACHE_INIT, PARAMNAME_QUERY_TIMEOUT, PARAMNAME_QUERY_TIMEOUT_CACHE_INIT, PARAMNAME_READ_ONLY, PARAMNAME_RESERVE_FACTOR, PARAMNAME_SELECT_OIDS, PARAMNAME_SIMPLE_CACHE_ROW_COUNT_LIMIT, PARAMNAME_SYNCH_LOAD_ROW_COUNT_LIMIT, PARAMNAME_TRANSACTION_CACHES, PARAMNAME_TRANSACTION_CHECK, QUERY_CACHING, SIMPLE_QUERY_CACHE
 
Fields inherited from interface com.lutris.appserver.server.sql.standard.DriverSpecificConstants
DEFAULT_CUSTOM_NOT_EQUAL_SQL_OPERATOR, DEFAULT_DISABLE_FETCH_SIZE_WITH_MAX_ROWS, DEFAULT_PREPARE_STATEMENT_CACHE_LATENCY, DEFAULT_RESULT_SET_CONCURRENCY, DEFAULT_RESULT_SET_TYPE, DEFAULT_SET_BOOLEAN_AS_STRING, DEFAULT_SET_BYTES_AS_BINARY_STREAM, DEFAULT_SET_BYTES_AS_LONGVARBINARY, DEFAULT_SET_NULL_AS_VARCHAR, DEFAULT_USE_BINARY_STREAM_FOR_LONGVARCHAR, DEFAULT_USE_CURSOR_NAME, DEFAULT_USE_PREFIX_WITH_UPDATE, DEFAULT_USE_TOP_SYNTAX, PARAMNAME_CUSTOM_NOT_EQUAL_SQL_OPERATOR, PARAMNAME_DISABLE_FETCH_SIZE_WITH_MAX_ROWS, PARAMNAME_PREPARE_STATEMENT_CACHE_LATENCY, PARAMNAME_RESULT_SET_CONCURRENCY, PARAMNAME_RESULT_SET_TYPE, PARAMNAME_SET_BOOLEAN_AS_STRING, PARAMNAME_SET_BYTES_AS_BINARY_STREAM, PARAMNAME_SET_BYTES_AS_LONGVARBINARY, PARAMNAME_SET_NULL_AS_VARCHAR, PARAMNAME_USE_BINARY_STREAM_FOR_LONGVARCHAR, PARAMNAME_USE_CURSOR_NAME, PARAMNAME_USE_PREFIX_WITH_UPDATE, PARAMNAME_USE_TOP_SYNTAX, UNDEFINED_PREPARE_STATEMENT_CACHE_LATENCY
 
Constructor Summary
StandardDatabaseManager(Config config)
          Creates a new DatabaseManager object and configures the logical databases defined in the config file.
 
Method Summary
 DBConnection allocateConnection()
          Allocate a connection to a thread.
 DBConnection allocateConnection(java.lang.String dbName)
          Allocate a connection to a thread.
 ObjectId allocateObjectId()
          Allocate an object id from the specified logical database.
 ObjectId allocateObjectId(java.lang.String dbName)
          Allocate an object id from the specified logical database.
 ObjectId allocateObjectId(java.lang.String dbName, java.lang.String tableName)
          Allocate an object id from the specified logical database, for given database table.
 void asynchInitCaches()
           
 void asynchInitCaches(int threadNum)
           
 void checkOId(ObjectId oid)
          Check does oid belong to Object id's range [minOId, currentOId] for default database
 void checkOId(java.lang.String dbName, ObjectId oid)
          Check does oid belong to Object id's range [minOId, currentOId]
 void checkOId(java.lang.String dbName, java.lang.String tableName, ObjectId oid)
          Check does oid belong to Object id's range [minOId, currentOId]
 DBQuery createQuery()
          Create a query object for the default logical database.
 DBQuery createQuery(java.lang.String dbName)
          Create a query object for the specified logical database.
 DBTransaction createTransaction()
          Create a transaction object for the default logical database.
 DBTransaction createTransaction(java.lang.String dbName)
          Create a transaction object for the specified logical database.
 LogicalDatabase findLogicalDatabase(java.lang.String dbName)
          Find the named logical database in hash table.
 int getActiveConnectionCount(java.lang.String dbName)
          Gets the number of currently active connections.
 boolean getAllReadOnly()
          Return allReadOnly parameter (given in config file)
 java.lang.String getAppName()
          Return AppName parameter (given in config file)
 java.util.Map getAsynchCacheLoadClasses()
           
 Config getConfig()
          Return main configuration class
 DatabaseManagerConfiguration getDatabaseManagerConfiguration()
           
 java.lang.String getDefaultDB()
          Return default database name (given in config file)
 java.lang.String[] getLogicalDatabaseNames()
          Returns the list of managed logical databases.
 int getMaxConnectionCount(java.lang.String dbName)
          Gets the maximum number of concurent connections that existed at any time since this object was created, or resetMaxConnectionCount() was called.
 java.util.Date getMaxConnectionCountDate(java.lang.String dbName)
          Gets the time when the maximum refered to by maxConnectionCount() occured.
 Config getParentConfig()
          Return main application configuration class
 long getRequestCount(java.lang.String dbName)
          Gets the number of requests made to the database since startup time.
 java.lang.String getType(java.lang.String dbName)
          Returns a description of the logical database type.
 void initAllDodsCaches(Config cfg, java.lang.ClassLoader cls)
          Init chaches for all Databases specified in DatabaseManager section of application conf file.
 void initCaches(java.lang.ClassLoader clsLoader)
           
 LogicalDatabase loadLogicalDatabase(java.lang.String dbName, Config dbConfig)
          Actually load the specified logical database.
 java.lang.String logicalDatabaseType()
          Return a loical database type for the default logical database.
 java.lang.String logicalDatabaseType(java.lang.String dbName)
          Return a loical database type for the specified logical database.
static DatabaseManager newInstance(java.lang.String fileName)
          Creates new StandardDatabaseManager instance.
static DatabaseManager newInstance(java.net.URL confURL, java.lang.String confFile)
          Creates new StandardDatabaseManager instance.
 void registerMBeans(java.lang.String appPrefix, Config appConfig, java.lang.ClassLoader clsLoader)
           
 void resetMaxConnectionCount(java.lang.String dbName)
          Reset the maximum connection count.
 void setDebugLogging(boolean condition)
          Turn debugging on or off.
 void setDefaultDatabase(java.lang.String dbName)
          Set the default logical database.
 void shutdown()
          Shutdown the database manager.
 void unregisterMBeans()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected boolean debug
Controls debugging for Transactions and Queries.


defaultDB

protected java.lang.String defaultDB

config

protected Config config

confDir

protected java.lang.String confDir

dodsMBeans

protected DODSMBeans dodsMBeans
Constructor Detail

StandardDatabaseManager

public StandardDatabaseManager(Config config)
                        throws ConfigException,
                               DatabaseManagerException,
                               java.sql.SQLException
Creates a new DatabaseManager object and configures the logical databases defined in the config file.

Parameters:
config - The configuration data for logical databases.
Throws:
ConfigException - If there is an error in the configuration file.
DatabaseManagerException - If a logical database name is specified twice in the configuration file.
java.sql.SQLException - If a SQL error occurs.
Method Detail

initCaches

public void initCaches(java.lang.ClassLoader clsLoader)

newInstance

public static DatabaseManager newInstance(java.net.URL confURL,
                                          java.lang.String confFile)
                                   throws ConfigException,
                                          DatabaseManagerException,
                                          java.sql.SQLException
Creates new StandardDatabaseManager instance.

Parameters:
confURL - Additional path to folder or *.jar file with configuration file. If null use DODS classpath
confFile - Name of conf file relativ to *.jar file or to specifide folder (from confURL/DODS claspath).
Returns:
new StandardDatabaseManager instance.
Throws:
ConfigException
DatabaseManagerException
java.sql.SQLException

newInstance

public static DatabaseManager newInstance(java.lang.String fileName)
                                   throws ConfigException,
                                          DatabaseManagerException,
                                          java.sql.SQLException
Creates new StandardDatabaseManager instance.

Parameters:
fileName - full path name of the application configuration file.
Returns:
new StandardDatabaseManager instance.
Throws:
ConfigException
DatabaseManagerException
java.sql.SQLException

getConfig

public Config getConfig()
Return main configuration class

Specified by:
getConfig in interface DatabaseManager
Returns:
main configuration class.

getParentConfig

public Config getParentConfig()
Return main application configuration class

Returns:
main application configuration class.

loadLogicalDatabase

public LogicalDatabase loadLogicalDatabase(java.lang.String dbName,
                                           Config dbConfig)
                                    throws DatabaseManagerException
Actually load the specified logical database. This method provides an easy way to override the default behavour.

Returns:
The logical database.
Throws:
DatabaseManagerException - if an error occurs creating the logical database.

getDefaultDB

public java.lang.String getDefaultDB()
Return default database name (given in config file)

Specified by:
getDefaultDB in interface DatabaseManager
Returns:
default database name

allocateConnection

public DBConnection allocateConnection(java.lang.String dbName)
                                throws DatabaseManagerException,
                                       java.sql.SQLException
Allocate a connection to a thread. The connection should be returned to the allocator by calling its release() function. A thread will wait if no connections are available. Interupted exceptions are converted to errors. N.B. Can't be synchronized, as connection allocator allocate may wait.

Specified by:
allocateConnection in interface DatabaseManager
Parameters:
dbName - Logical name of the database to allocate a connection to.
Returns:
The allocated connection object.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.
java.sql.SQLException - If a SQL error occures.

allocateConnection

public DBConnection allocateConnection()
                                throws DatabaseManagerException,
                                       java.sql.SQLException
Allocate a connection to a thread. The connection should be returned to the allocator by calling its release() function. A thread will wait if no connections are available. Interupted exceptions are converted to errors. The connection is allocated from the default logical database.

Specified by:
allocateConnection in interface DatabaseManager
Returns:
The allocated connection object.
Throws:
DatabaseManagerException - If no default logical database has been set.
java.sql.SQLException - If a SQL error occurs.
See Also:
setDefaultDatabase(java.lang.String)

allocateObjectId

public ObjectId allocateObjectId(java.lang.String dbName)
                          throws DatabaseManagerException,
                                 ObjectIdException
Allocate an object id from the specified logical database.

Specified by:
allocateObjectId in interface DatabaseManager
Parameters:
dbName - Logical name of the database from which to obtain an object id.
Returns:
The allocated unique OID
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.
ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID.

allocateObjectId

public ObjectId allocateObjectId()
                          throws DatabaseManagerException,
                                 ObjectIdException
Allocate an object id from the specified logical database.

Specified by:
allocateObjectId in interface DatabaseManager
Returns:
The allocated connection object.
Throws:
DatabaseManagerException - If a nonexistent default logical database has been set.
ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID.
See Also:
setDefaultDatabase(java.lang.String)

allocateObjectId

public ObjectId allocateObjectId(java.lang.String dbName,
                                 java.lang.String tableName)
                          throws DatabaseManagerException,
                                 ObjectIdException
Allocate an object id from the specified logical database, for given database table.

Parameters:
tableName - Database table name.
Returns:
new ObjectId
Throws:
DatabaseManagerException - If a nonexistent default logical database has been set.
ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID.
See Also:
setDefaultDatabase(java.lang.String)

checkOId

public void checkOId(java.lang.String dbName,
                     java.lang.String tableName,
                     ObjectId oid)
              throws DatabaseManagerException,
                     ObjectIdException
Check does oid belong to Object id's range [minOId, currentOId]

Parameters:
dbName - Logical name of the database from which to check an object id.
tableName - Database table name.
oid - oid which will be checked.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.
ObjectIdException - If a oid does't belong to range.

checkOId

public void checkOId(java.lang.String dbName,
                     ObjectId oid)
              throws DatabaseManagerException,
                     ObjectIdException
Check does oid belong to Object id's range [minOId, currentOId]

Specified by:
checkOId in interface DatabaseManager
Parameters:
dbName - Logical name of the database from which to check an object id.
oid - oid which will be checked.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.
ObjectIdException - If a oid does't belong to range.

checkOId

public void checkOId(ObjectId oid)
              throws DatabaseManagerException,
                     ObjectIdException
Check does oid belong to Object id's range [minOId, currentOId] for default database

Specified by:
checkOId in interface DatabaseManager
Parameters:
oid - oid which will be checked.
Throws:
DatabaseManagerException - If a nonexistent default logical database has been set.
ObjectIdException - If a oid does't belong to range.

createTransaction

public DBTransaction createTransaction(java.lang.String dbName)
                                throws DatabaseManagerException,
                                       java.sql.SQLException
Create a transaction object for the specified logical database.

Specified by:
createTransaction in interface DatabaseManager
Parameters:
dbName - Logical name of the database from which to obtain a transaction.
Returns:
The transaction
Throws:
DatabaseManagerException - If a nonexistent or invalid logical database name is supplied.
java.sql.SQLException - If a problem occured creating the transaction.

createTransaction

public DBTransaction createTransaction()
                                throws DatabaseManagerException,
                                       java.sql.SQLException
Create a transaction object for the default logical database.

Specified by:
createTransaction in interface DatabaseManager
Returns:
The transaction
Throws:
DatabaseManagerException - If a nonexistent default logical database has been set.
java.sql.SQLException - If a problem occured creating the transaction.
See Also:
setDefaultDatabase(java.lang.String)

createQuery

public DBQuery createQuery(java.lang.String dbName)
                    throws DatabaseManagerException,
                           java.sql.SQLException
Create a query object for the specified logical database.

Specified by:
createQuery in interface DatabaseManager
Parameters:
dbName - Logical name of the database from which to obtain a query.
Returns:
The query
Throws:
DatabaseManagerException - If a nonexistent or invalid logical database name is supplied.
java.sql.SQLException - If a problem occured creating the query.

createQuery

public DBQuery createQuery()
                    throws DatabaseManagerException,
                           java.sql.SQLException
Create a query object for the default logical database.

Specified by:
createQuery in interface DatabaseManager
Returns:
The query
Throws:
DatabaseManagerException - If a nonexistent default logical database has been set.
java.sql.SQLException - If a problem occured creating the query.
See Also:
setDefaultDatabase(java.lang.String)

logicalDatabaseType

public java.lang.String logicalDatabaseType(java.lang.String dbName)
                                     throws DatabaseManagerException,
                                            java.sql.SQLException
Return a loical database type for the specified logical database.

Specified by:
logicalDatabaseType in interface DatabaseManager
Parameters:
dbName - Logical name of the database from which to obtain a query.
Returns:
loical database type
Throws:
DatabaseManagerException - If a nonexistent or invalid logical database name is supplied.
java.sql.SQLException - If a problem occured creating the query.

logicalDatabaseType

public java.lang.String logicalDatabaseType()
                                     throws DatabaseManagerException,
                                            java.sql.SQLException
Return a loical database type for the default logical database.

Specified by:
logicalDatabaseType in interface DatabaseManager
Returns:
loical database type
Throws:
DatabaseManagerException - If a nonexistent default logical database has been set.
java.sql.SQLException - If a problem occured creating the query.
See Also:
setDefaultDatabase(java.lang.String)

findLogicalDatabase

public LogicalDatabase findLogicalDatabase(java.lang.String dbName)
                                    throws DatabaseManagerException
Find the named logical database in hash table.

Specified by:
findLogicalDatabase in interface DatabaseManager
Parameters:
dbName - Logical name of the database to locate.
Throws:
DatabaseManagerException - If a nonexistant logical database name is supplied.

setDefaultDatabase

public void setDefaultDatabase(java.lang.String dbName)
                        throws DatabaseManagerException
Set the default logical database. This should only be called after the logical database ( has been established.

Specified by:
setDefaultDatabase in interface DatabaseManager
Parameters:
dbName - The default logical database.
Throws:
DatabaseManagerException - if the logical database name is invalid or not found.

shutdown

public void shutdown()
Shutdown the database manager. All logical databases will be shutdown and all connections closed.

Specified by:
shutdown in interface DatabaseManager

getLogicalDatabaseNames

public java.lang.String[] getLogicalDatabaseNames()
Returns the list of managed logical databases.

Specified by:
getLogicalDatabaseNames in interface DatabaseManager
Returns:
List of logical database names.

getType

public java.lang.String getType(java.lang.String dbName)
                         throws DatabaseManagerException
Returns a description of the logical database type.

Specified by:
getType in interface DatabaseManager
Parameters:
dbName - The logical database name.
Returns:
A text description of the logical database type.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.

getRequestCount

public long getRequestCount(java.lang.String dbName)
                     throws DatabaseManagerException
Gets the number of requests made to the database since startup time.

Specified by:
getRequestCount in interface DatabaseManager
Parameters:
dbName - The name of the logical database.
Returns:
The number of database requests since the server started.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.

getActiveConnectionCount

public int getActiveConnectionCount(java.lang.String dbName)
                             throws DatabaseManagerException
Gets the number of currently active connections.

Specified by:
getActiveConnectionCount in interface DatabaseManager
Parameters:
dbName - The name of the logical database.
Returns:
The number of currently active connections.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.

getMaxConnectionCount

public int getMaxConnectionCount(java.lang.String dbName)
                          throws DatabaseManagerException
Gets the maximum number of concurent connections that existed at any time since this object was created, or resetMaxConnectionCount() was called. This is a historical highwater mark. If you do not implement this feature, return -1.

Specified by:
getMaxConnectionCount in interface DatabaseManager
Parameters:
dbName - The name of the logical database.
Returns:
The highwater mark for number of connections, or -1.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.

getMaxConnectionCountDate

public java.util.Date getMaxConnectionCountDate(java.lang.String dbName)
                                         throws DatabaseManagerException
Gets the time when the maximum refered to by maxConnectionCount() occured.

Specified by:
getMaxConnectionCountDate in interface DatabaseManager
Parameters:
dbName - The name of the logical database.
Returns:
The Date of when the maximum number of connections occured.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.

resetMaxConnectionCount

public void resetMaxConnectionCount(java.lang.String dbName)
                             throws DatabaseManagerException
Reset the maximum connection count. See maxConnectionCount(). The highwater mark should be reset to the current number of connections.

Specified by:
resetMaxConnectionCount in interface DatabaseManager
Parameters:
dbName - The name of the logical database.
Throws:
DatabaseManagerException - If a nonexistent logical database name is supplied.

setDebugLogging

public void setDebugLogging(boolean condition)
Turn debugging on or off.

Parameters:
condition - on of off.

getAllReadOnly

public boolean getAllReadOnly()
Return allReadOnly parameter (given in config file)

Returns:
allReadOnly parameter

getAppName

public java.lang.String getAppName()
Return AppName parameter (given in config file)

Returns:
AppName parameter

getDatabaseManagerConfiguration

public DatabaseManagerConfiguration getDatabaseManagerConfiguration()

getAsynchCacheLoadClasses

public java.util.Map getAsynchCacheLoadClasses()

initAllDodsCaches

public void initAllDodsCaches(Config cfg,
                              java.lang.ClassLoader cls)
Init chaches for all Databases specified in DatabaseManager section of application conf file.

Parameters:
cfg - DatabaseManager section of app configuration file.
cls - application classLoader

asynchInitCaches

public void asynchInitCaches()

asynchInitCaches

public void asynchInitCaches(int threadNum)

registerMBeans

public void registerMBeans(java.lang.String appPrefix,
                           Config appConfig,
                           java.lang.ClassLoader clsLoader)
Specified by:
registerMBeans in interface DatabaseManager

unregisterMBeans

public void unregisterMBeans()
Specified by:
unregisterMBeans in interface DatabaseManager

DODS 7.6 API