Lifecycle.SingleUse| Modifier and Type | Field and Description | 
|---|---|
| protected String | connectionNameThe connection username to use when trying to connect to the database. | 
| protected String | connectionPasswordThe connection URL to use when trying to connect to the database. | 
| protected String | connectionURLConnection string to use when connecting to the DB. | 
| protected DataSource | dataSourceDataSource to use | 
| protected String | dataSourceNamename of the JNDI resource | 
| protected Driver | driverInstance of the JDBC Driver class we use as a connection factory. | 
| protected String | driverNameDriver to use. | 
| protected static String | infoThe descriptive information about this implementation. | 
| protected PreparedStatement | preparedClearSqlVariable to hold the  clear()prepared statement. | 
| protected PreparedStatement | preparedLoadSqlVariable to hold the  load()prepared statement. | 
| protected PreparedStatement | preparedRemoveSqlVariable to hold the  remove()prepared statement. | 
| protected PreparedStatement | preparedSaveSqlVariable to hold the  save()prepared statement. | 
| protected PreparedStatement | preparedSizeSqlVariable to hold the  getSize()prepared statement. | 
| protected String | sessionAppColColumn to use for /Engine/Host/Context name | 
| protected String | sessionDataColData column to use. | 
| protected String | sessionIdColId column to use. | 
| protected String | sessionLastAccessedColLast Accessed column to use. | 
| protected String | sessionMaxInactiveColMax Inactive column to use. | 
| protected String | sessionTableTable to use. | 
| protected String | sessionValidColIs Validcolumn to use. | 
| protected static String | storeNameName to register for this Store, used for logging. | 
| protected String | threadNameName to register for the background thread. | 
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description | 
|---|
| JDBCStore() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Remove all of the Sessions in this Store. | 
| protected void | close(Connection dbConnection)Close the specified database connection. | 
| String[] | expiredKeys()Get only those keys of sessions, that are saved in the Store and are to
 be expired. | 
| protected Connection | getConnection()Check the connection associated with this store, if it's
  nullor closed try to reopen it. | 
| String | getConnectionName() | 
| String | getConnectionPassword() | 
| String | getConnectionURL() | 
| String | getDataSourceName() | 
| String | getDriverName() | 
| String | getInfo() | 
| String | getName() | 
| String | getSessionAppCol() | 
| String | getSessionDataCol() | 
| String | getSessionIdCol() | 
| String | getSessionLastAccessedCol() | 
| String | getSessionMaxInactiveCol() | 
| String | getSessionTable() | 
| String | getSessionValidCol() | 
| int | getSize()Return an integer containing a count of all Sessions
 currently saved in this Store. | 
| String | getStoreName() | 
| String | getThreadName() | 
| String[] | keys() | 
| Session | load(String id)Load the Session associated with the id  id. | 
| protected Connection | open()Open (if necessary) and return a database connection for use by
 this Store. | 
| protected void | release(Connection conn)Release the connection, if it
 is associated with a connection pool. | 
| void | remove(String id)Remove the Session with the specified session identifier from
 this Store, if present. | 
| void | save(Session session)Save a session to the Store. | 
| void | setConnectionName(String connectionName)Set the username to use to connect to the database. | 
| void | setConnectionPassword(String connectionPassword)Set the password to use to connect to the database. | 
| void | setConnectionURL(String connectionURL)Set the Connection URL for this Store. | 
| void | setDataSourceName(String dataSourceName)Set the JNDI name of a DataSource-factory to use for db access | 
| void | setDriverName(String driverName)Set the driver for this Store. | 
| void | setSessionAppCol(String sessionAppCol)Set the App column for the table. | 
| void | setSessionDataCol(String sessionDataCol)Set the Data column for the table | 
| void | setSessionIdCol(String sessionIdCol)Set the Id column for the table. | 
| void | setSessionLastAccessedCol(String sessionLastAccessedCol)Set the  Last Accessedcolumn for the table | 
| void | setSessionMaxInactiveCol(String sessionMaxInactiveCol)Set the  Max Inactivecolumn for the table | 
| void | setSessionTable(String sessionTable)Set the table for this Store. | 
| void | setSessionValidCol(String sessionValidCol)Set the  Is Validcolumn for the table | 
| protected void | startInternal()Start this component and implement the requirements
 of  LifecycleBase.startInternal(). | 
| protected void | stopInternal()Stop this component and implement the requirements
 of  LifecycleBase.stopInternal(). | 
addPropertyChangeListener, destroyInternal, getManager, getObjectInputStream, initInternal, processExpires, removePropertyChangeListener, setManager, toStringaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopprotected static final String info
protected static String storeName
protected String threadName
protected String connectionName
protected String connectionPassword
protected String connectionURL
protected Driver driver
protected String driverName
protected String dataSourceName
protected DataSource dataSource
protected String sessionTable
protected String sessionAppCol
protected String sessionIdCol
protected String sessionDataCol
protected String sessionValidCol
Is Valid column to use.protected String sessionMaxInactiveCol
protected String sessionLastAccessedCol
protected PreparedStatement preparedSizeSql
getSize() prepared statement.protected PreparedStatement preparedSaveSql
save() prepared statement.protected PreparedStatement preparedClearSql
clear() prepared statement.protected PreparedStatement preparedRemoveSql
remove() prepared statement.protected PreparedStatement preparedLoadSql
load() prepared statement.public String getInfo()
public String getName()
public String getThreadName()
public String getStoreName()
getStoreName in class StoreBasepublic void setDriverName(String driverName)
driverName - The new driverpublic String getDriverName()
public String getConnectionName()
public void setConnectionName(String connectionName)
connectionName - Usernamepublic String getConnectionPassword()
public void setConnectionPassword(String connectionPassword)
connectionPassword - User passwordpublic void setConnectionURL(String connectionURL)
connectionURL - The new Connection URLpublic String getConnectionURL()
public void setSessionTable(String sessionTable)
sessionTable - The new tablepublic String getSessionTable()
public void setSessionAppCol(String sessionAppCol)
sessionAppCol - the column namepublic String getSessionAppCol()
public void setSessionIdCol(String sessionIdCol)
sessionIdCol - the column namepublic String getSessionIdCol()
public void setSessionDataCol(String sessionDataCol)
sessionDataCol - the column namepublic String getSessionDataCol()
public void setSessionValidCol(String sessionValidCol)
Is Valid column for the tablesessionValidCol - The column namepublic String getSessionValidCol()
Is Valid columnpublic void setSessionMaxInactiveCol(String sessionMaxInactiveCol)
Max Inactive column for the tablesessionMaxInactiveCol - The column namepublic String getSessionMaxInactiveCol()
Max Inactive columnpublic void setSessionLastAccessedCol(String sessionLastAccessedCol)
Last Accessed column for the tablesessionLastAccessedCol - The column namepublic String getSessionLastAccessedCol()
Last Accessed columnpublic void setDataSourceName(String dataSourceName)
dataSourceName - The JNDI name of the DataSource-factorypublic String getDataSourceName()
public String[] expiredKeys() throws IOException
StoreBaseexpiredKeys in class StoreBaseIOException - if an input-/output error occurredpublic String[] keys() throws IOException
IOException - if an input/output error occurredpublic int getSize()
            throws IOException
0 is returned.IOException - if an input/output error occurredpublic Session load(String id) throws ClassNotFoundException, IOException
id.
 If no such session is found null is returned.id - a value of type StringSessionClassNotFoundException - if an error occursIOException - if an input/output error occurredpublic void remove(String id) throws IOException
id - Session identifier of the Session to be removedIOException - if an input/output error occurspublic void clear()
           throws IOException
IOException - if an input/output error occurspublic void save(Session session) throws IOException
session - the session to be storedIOException - if an input/output error occursprotected Connection getConnection()
null or closed try to reopen it.
 Returns null if the connection could not be established.Connection if the connection succeededprotected Connection open() throws SQLException
SQLException - if a database error occursprotected void close(Connection dbConnection)
dbConnection - The connection to be closedprotected void release(Connection conn)
conn - The connection to be releasedprotected void startInternal()
                      throws LifecycleException
LifecycleBase.startInternal().startInternal in class StoreBaseLifecycleException - if this component detects a fatal error
  that prevents this component from being usedprotected void stopInternal()
                     throws LifecycleException
LifecycleBase.stopInternal().stopInternal in class StoreBaseLifecycleException - if this component detects a fatal error
  that prevents this component from being usedCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.