| Modifier and Type | Class and Description |
|---|---|
| public class | JDBCSessionIdManager.
DatabaseAdaptor Handles differences between databases. |
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected String | |
| protected String | |
| protected DataSource | |
| protected JDBCSessionIdManager. | |
| protected String | |
| protected String | |
| protected String | |
| protected String | |
| protected String | |
| protected long | |
| protected String | |
| protected long | |
| protected String | |
| protected HashSet | |
| protected String | |
| protected String | |
| protected TimerTask | |
| protected Timer |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addSession(HttpSession
The session session)Implements org. |
| private void | |
| public void | doStart()
Overrides org. |
| public void | |
| private boolean | |
| public String | getClusterId(String nodeId)
Implements org. |
| protected Connection | |
| public String | |
| public String | |
| public String | |
| public String | getNodeId(String
The ID of the session clusterId, HttpServletRequest The request that for the session (or null) request)Implements org. |
| public long | |
| public boolean | idInUse(String
The session ID without any cluster node extension id)Implements org. |
| private void | |
| private void | |
| public void | invalidateAll(String
The session ID without any cluster node extension id)Implements org. |
| private void | |
| public void | removeSession(HttpSession session)
Implements org. |
| public void | |
| private void | |
| public void | |
| public void | setDriverInfo(String driverClassName, String connectionUrl)
Configure jdbc connection information via a jdbc Driver |
| public void |
| _connectionUrl | back to summary |
|---|---|
| protected String _connectionUrl | |
| _createSessionIdTable | back to summary |
|---|---|
| protected String _createSessionIdTable | |
| _createSessionTable | back to summary |
|---|---|
| protected String _createSessionTable | |
| _datasource | back to summary |
|---|---|
| protected DataSource _datasource | |
| _dbAdaptor | back to summary |
|---|---|
| protected JDBCSessionIdManager. | |
| _deleteId | back to summary |
|---|---|
| protected String _deleteId | |
| _deleteOldExpiredSessions | back to summary |
|---|---|
| protected String _deleteOldExpiredSessions | |
| _driverClassName | back to summary |
|---|---|
| protected String _driverClassName | |
| _insertId | back to summary |
|---|---|
| protected String _insertId | |
| _jndiName | back to summary |
|---|---|
| protected String _jndiName | |
| _lastScavengeTime | back to summary |
|---|---|
| protected long _lastScavengeTime | |
| _queryId | back to summary |
|---|---|
| protected String _queryId | |
| _scavengeIntervalMs | back to summary |
|---|---|
| protected long _scavengeIntervalMs | |
| _selectExpiredSessions | back to summary |
|---|---|
| protected String _selectExpiredSessions | |
| _sessionIds | back to summary |
|---|---|
| protected HashSet<String> _sessionIds | |
| _sessionIdTable | back to summary |
|---|---|
| protected String _sessionIdTable | |
| _sessionTable | back to summary |
|---|---|
| protected String _sessionTable | |
| _task | back to summary |
|---|---|
| protected TimerTask _task | |
| _timer | back to summary |
|---|---|
| protected Timer _timer | |
| JDBCSessionIdManager | back to summary |
|---|---|
| public JDBCSessionIdManager(Server server) | |
| JDBCSessionIdManager | back to summary |
|---|---|
| public JDBCSessionIdManager(Server server, Random random) | |
| addSession | back to summary |
|---|---|
| public void addSession(HttpSession session) Implements org. Doc from org. Add a session to the list of known sessions for a given ID.
| |
| delete | back to summary |
|---|---|
| private void delete(String id) throws SQLException Remove a session id from the table. | |
| doStart | back to summary |
|---|---|
| public void doStart() Overrides org. Start up the id manager. Makes necessary database tables and starts a Session scavenger thread. | |
| doStop | back to summary |
|---|---|
| public void doStop() throws Exception Overrides org. Stop the scavenger. | |
| exists | back to summary |
|---|---|
| private boolean exists(String id) throws SQLException Check if a session id exists. | |
| getClusterId | back to summary |
|---|---|
| public String getClusterId(String nodeId) Implements org. Get the session id without any node identifier suffix. | |
| getConnection | back to summary |
|---|---|
| protected Connection getConnection() throws SQLException Get a connection from the driver or datasource. | |
| getConnectionUrl | back to summary |
|---|---|
| public String getConnectionUrl() | |
| getDatasourceName | back to summary |
|---|---|
| public String getDatasourceName() | |
| getDriverClassName | back to summary |
|---|---|
| public String getDriverClassName() | |
| getNodeId | back to summary |
|---|---|
| public String getNodeId(String clusterId, HttpServletRequest request) Implements org. Get the session id, including this node's id as a suffix.
| |
| getScavengeInterval | back to summary |
|---|---|
| public long getScavengeInterval() | |
| idInUse | back to summary |
|---|---|
| public boolean idInUse(String id) Implements org.
| |
| initializeDatabase | back to summary |
|---|---|
| private void initializeDatabase() throws Exception | |
| insert | back to summary |
|---|---|
| private void insert(String id) throws SQLException Insert a new used session id into the table. | |
| invalidateAll | back to summary |
|---|---|
| public void invalidateAll(String id) Implements org. Invalidate the session matching the id on all contexts.
| |
| prepareTables | back to summary |
|---|---|
| private void prepareTables() throws SQLException Set up the tables in the database | |
| removeSession | back to summary |
|---|---|
| public void removeSession(HttpSession session) Implements org. Doc from org. Remove session from the list of known sessions for a given ID. | |
| removeSession | back to summary |
|---|---|
| public void removeSession(String id) | |
| scavenge | back to summary |
|---|---|
| private void scavenge() Look for sessions in the database that have expired. We do this in the SessionIdManager and not the SessionManager so that we only have 1 scavenger, otherwise if there are n SessionManagers there would be n scavengers, all contending for the database. We look first for sessions that expired in the previous interval, then for sessions that expired previously - these are old sessions that no node is managing any more and have become stuck in the database. | |
| setDatasourceName | back to summary |
|---|---|
| public void setDatasourceName(String jndi) | |
| setDriverInfo | back to summary |
|---|---|
| public void setDriverInfo(String driverClassName, String connectionUrl) Configure jdbc connection information via a jdbc Driver | |
| setScavengeInterval | back to summary |
|---|---|
| public void setScavengeInterval(long sec) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String | |
| pack-priv boolean | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | convertIdentifier(String identifier)
Convert a camel case identifier into either upper or lower depending on the way the db stores identifiers. |
| public InputStream | |
| public String |
| _dbName | back to summary |
|---|---|
| pack-priv String _dbName | |
| _isLower | back to summary |
|---|---|
| pack-priv boolean _isLower | |
| _isUpper | back to summary |
|---|---|
| pack-priv boolean _isUpper | |
| DatabaseAdaptor | back to summary |
|---|---|
| public DatabaseAdaptor(DatabaseMetaData dbMeta) throws SQLException | |
| convertIdentifier | back to summary |
|---|---|
| public String convertIdentifier(String identifier) Convert a camel case identifier into either upper or lower depending on the way the db stores identifiers. | |
| getBlobInputStream | back to summary |
|---|---|
| public InputStream getBlobInputStream(ResultSet result, String columnName) throws SQLException | |
| getBlobType | back to summary |
|---|---|
| public String getBlobType() | |