Store interface that stores serialized session objects in a
database. Sessions that are saved are still subject to being expired based on inactivity.
| Modifier and Type | Field and Description |
|---|---|
| protected DataSource | dataSource
DataSource to use |
| protected String | dataSourceName
name of the JNDI resource |
| private boolean | localDataSource
Context local datasource. |
| private String | name
Context name associated with this Store |
| protected String | sessionAppCol
Column to use for /Engine/Host/Context name |
| protected String | sessionDataCol
Data column to use. |
| protected String | sessionIdCol
Id column to use. |
| protected String | sessionLastAccessedCol
Last Accessed column to use. |
| protected String | sessionMaxInactiveCol
Max Inactive column to use. |
| protected String | sessionTable
Table to use. |
| protected String | sessionValidCol
|
| protected static final String | storeName
Name to register for this Store, used for logging.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| public String[] | expiredKeys()
Overrides org. Get only those keys of sessions, that are saved in the Store and are to be expired. |
| protected Connection | Returns: Connection if the connection succeededCheck the connection associated with this store, if it's |
| public String | |
| public boolean | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public int | Returns: the count of all sessions currently saved in this StoreImplements org. Return an integer containing a count of all Sessions currently saved in this Store. |
| public String | Returns: the name for this Store, used for logging.Overrides org.
|
| public String[] | |
| private String[] | Returns: array containing the list of session IDsflag, whether only keys of expired sessions should be returned expiredOnly)Return an array containing the session identifiers of all Sessions currently saved in this Store. |
| public Session | Returns: the storedSessiona value of type id)StringImplements org. Load the Session associated with the id |
| protected Connection | Returns: database connection ready to useOpen (if necessary) and return a database connection for use by this Store. |
| protected void | release(Connection
The connection to be released conn)Release the connection, if it is associated with a connection pool. |
| public void | remove(String
Session identifier of the Session to be removed id)Implements org. Remove the Session with the specified session identifier from this Store, if present. |
| private void | remove(String
Session identifier of the Session to be removed id, Connection open connection to be used _conn)Remove the Session with the specified session identifier from this Store, if present. |
| public void | save(Session
the session to be stored session)Implements org. Save a session to the Store. |
| public void | setDataSourceName(String
The JNDI name of the DataSource-factory dataSourceName)Set the JNDI name of a DataSource-factory to use for db access |
| public void | setLocalDataSource(boolean
the new flag value localDataSource)Set to |
| public void | |
| public void | |
| public void | |
| public void | setSessionLastAccessedCol(String
The column name sessionLastAccessedCol)Set the |
| public void | setSessionMaxInactiveCol(String
The column name sessionMaxInactiveCol)Set the |
| public void | |
| public void |
| dataSource | back to summary |
|---|---|
| protected DataSource dataSource DataSource to use | |
| dataSourceName | back to summary |
|---|---|
| protected String dataSourceName name of the JNDI resource | |
| localDataSource | back to summary |
|---|---|
| private boolean localDataSource Context local datasource. | |
| name | back to summary |
|---|---|
| private String name Context name associated with this Store | |
| sessionAppCol | back to summary |
|---|---|
| protected String sessionAppCol Column to use for /Engine/Host/Context name | |
| sessionDataCol | back to summary |
|---|---|
| protected String sessionDataCol Data column to use. | |
| sessionIdCol | back to summary |
|---|---|
| protected String sessionIdCol Id column to use. | |
| sessionLastAccessedCol | back to summary |
|---|---|
| protected String sessionLastAccessedCol Last Accessed column to use. | |
| sessionMaxInactiveCol | back to summary |
|---|---|
| protected String sessionMaxInactiveCol Max Inactive column to use. | |
| sessionTable | back to summary |
|---|---|
| protected String sessionTable Table to use. | |
| sessionValidCol | back to summary |
|---|---|
| protected String sessionValidCol
| |
| storeName | back to summary |
|---|---|
| protected static final String storeName Hides org. Name to register for this Store, used for logging. | |
| DataSourceStore | back to summary |
|---|---|
| public DataSourceStore() | |
| clear | back to summary |
|---|---|
| public void clear() throws IOException Implements org. Remove all of the Sessions in this Store.
| |
| close | back to summary |
|---|---|
| protected void close(Connection dbConnection) Close the specified database connection.
| |
| expiredKeys | back to summary |
|---|---|
| public String[] expiredKeys() throws IOException Overrides org. Doc from org. Get only those keys of sessions, that are saved in the Store and are to be expired.
| |
| getConnection | back to summary |
|---|---|
| protected Connection getConnection() Check the connection associated with this store, if it's
| |
| getDataSourceName | back to summary |
|---|---|
public String getDataSourceName()
| |
| getLocalDataSource | back to summary |
|---|---|
public boolean getLocalDataSource()
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getSessionAppCol | back to summary |
|---|---|
public String getSessionAppCol()
| |
| getSessionDataCol | back to summary |
|---|---|
public String getSessionDataCol()
| |
| getSessionIdCol | back to summary |
|---|---|
public String getSessionIdCol()
| |
| getSessionLastAccessedCol | back to summary |
|---|---|
public String getSessionLastAccessedCol()
| |
| getSessionMaxInactiveCol | back to summary |
|---|---|
public String getSessionMaxInactiveCol()
| |
| getSessionTable | back to summary |
|---|---|
public String getSessionTable()
| |
| getSessionValidCol | back to summary |
|---|---|
public String getSessionValidCol()
| |
| getSize | back to summary |
|---|---|
| public int getSize() throws IOException Implements org. Return an integer containing a count of all Sessions currently saved in this Store. If there are no Sessions,
| |
| getStoreName | back to summary |
|---|---|
| public String getStoreName() Overrides org. | |
| keys | back to summary |
|---|---|
| public String[] keys() throws IOException Implements org.
| |
| keys | back to summary |
|---|---|
| private String[] keys(boolean expiredOnly) throws IOException Return an array containing the session identifiers of all Sessions currently saved in this Store. If there are no such Sessions, a zero-length array is returned.
| |
| load | back to summary |
|---|---|
| public Session load(String id) throws ClassNotFoundException, IOException Implements org. Load the Session associated with the id
| |
| open | back to summary |
|---|---|
| protected Connection open() throws SQLException Open (if necessary) and return a database connection for use by this Store.
| |
| release | back to summary |
|---|---|
| protected void release(Connection conn) Release the connection, if it is associated with a connection pool.
| |
| remove | back to summary |
|---|---|
| public void remove(String id) throws IOException Implements org. Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.
| |
| remove | back to summary |
|---|---|
| private void remove(String id, Connection _conn) throws SQLException Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.
| |
| save | back to summary |
|---|---|
| public void save(Session session) throws IOException Implements org. Save a session to the Store.
| |
| setDataSourceName | back to summary |
|---|---|
| public void setDataSourceName(String dataSourceName) Set the JNDI name of a DataSource-factory to use for db access
| |
| setLocalDataSource | back to summary |
|---|---|
| public void setLocalDataSource(boolean localDataSource) Set to
| |
| setSessionAppCol | back to summary |
|---|---|
| public void setSessionAppCol(String sessionAppCol) Set the App column for the table.
| |
| setSessionDataCol | back to summary |
|---|---|
| public void setSessionDataCol(String sessionDataCol) Set the Data column for the table
| |
| setSessionIdCol | back to summary |
|---|---|
| public void setSessionIdCol(String sessionIdCol) Set the Id column for the table.
| |
| setSessionLastAccessedCol | back to summary |
|---|---|
| public void setSessionLastAccessedCol(String sessionLastAccessedCol) Set the
| |
| setSessionMaxInactiveCol | back to summary |
|---|---|
| public void setSessionMaxInactiveCol(String sessionMaxInactiveCol) Set the
| |
| setSessionTable | back to summary |
|---|---|
| public void setSessionTable(String sessionTable) Set the table for this Store.
| |
| setSessionValidCol | back to summary |
|---|---|
| public void setSessionValidCol(String sessionValidCol) Set the
| |