Class DerbyConnectionPool
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.Pool<T>
-
- edu.uiuc.ncsa.security.storage.sql.ConnectionPool
-
- edu.uiuc.ncsa.security.storage.sql.derby.DerbyConnectionPool
-
public class DerbyConnectionPool extends ConnectionPool
Created by Jeff Gaynor
on 2/22/24 at 10:43 AM
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.security.storage.sql.ConnectionPool
alreadyShutdown, CONNECTION_TYPE_DEBRY, CONNECTION_TYPE_H2, CONNECTION_TYPE_MARIADB, CONNECTION_TYPE_MYSQL, CONNECTION_TYPE_POSTGRES, CONNECTION_TYPE_UNKNOWN, connectionParameters, uuid
-
Fields inherited from class edu.uiuc.ncsa.security.core.util.Pool
INFINITE, inUse, maxSize, stack, totalCreated, totalDestroyed
-
-
Constructor Summary
Constructors Constructor Description DerbyConnectionPool(DerbyConnectionParameters connectionParameters, List<String> createScript)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateStore()DerbyConnectionParametersgetConnectionParameters()List<String>getCreateScript()protected PropertiesgetDerbySecurityProperties()booleanhasCreateScript()booleanisFileStore()booleanisMemoryStore()voidsetCreateScript(List<String> createScript)protected PropertiessetProperties()Sets ths derby properties for creating the database.voidshutdown()For those store that need some cleanup.protected voidunsetProperties(Properties oldProperties)-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.ConnectionPool
create, destroy, getCleanupInterval, getIdelLifetime, getQueueInterval, getStackMap, getType, getUuid, isCleanupEnabled, isEnableQueue, isValid, pop, pop, push, setCleanupEnabled, setCleanupInterval, setConnectionParameters, setEnableQueue, setIdelLifetime, setQueueInterval, setStackMap, setType, setupDriverManager
-
Methods inherited from class edu.uiuc.ncsa.security.core.util.Pool
doCreate, doDestroy, getMaxSize, getStack, setMaxSize, toString, trace
-
-
-
-
Constructor Detail
-
DerbyConnectionPool
public DerbyConnectionPool(DerbyConnectionParameters connectionParameters, List<String> createScript)
-
-
Method Detail
-
getConnectionParameters
public DerbyConnectionParameters getConnectionParameters()
- Overrides:
getConnectionParametersin classConnectionPool
-
hasCreateScript
public boolean hasCreateScript()
-
createStore
public void createStore()
-
getDerbySecurityProperties
protected Properties getDerbySecurityProperties()
-
setProperties
protected Properties setProperties()
Sets ths derby properties for creating the database. Once these are set the newly created database has the correct security internal to the database, including setting the user name and password. However, as long as these are set, this means any subsequent access can only be to this database, unless this is undone byunsetProperties(Properties). When creating a database, set these for the minimum time required, then unset them or you will get all manner of authentication failures!
In particular if these are set, then you can only use a single database and attempts to connect to another database (unless it has identical password, bootpassword and user) will always fail.- Returns:
-
unsetProperties
protected void unsetProperties(Properties oldProperties)
-
isMemoryStore
public boolean isMemoryStore()
-
isFileStore
public boolean isFileStore()
-
shutdown
public void shutdown()
Description copied from class:ConnectionPoolFor those store that need some cleanup.- Overrides:
shutdownin classConnectionPool
-
-