|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--org.apache.catalina.session.StoreBase | +--org.apache.catalina.session.JDBCStore
Implementation of the Store
interface that stores
serialized session objects in a database. Sessions that are
saved are still subject to being expired based on inactivity.
フィールドの概要 | |
protected java.lang.String |
connString
Connection string to use when connecting to the DB. |
protected java.lang.String |
driverName
Driver to use. |
protected static java.lang.String |
info
The descriptive information about this implementation. |
protected java.sql.PreparedStatement |
preparedClearSql
Variable to hold the clear() prepared statement. |
protected java.sql.PreparedStatement |
preparedKeysSql
Variable to hold the keys() prepared statement. |
protected java.sql.PreparedStatement |
preparedLoadSql
Variable to hold the load() prepared statement. |
protected java.sql.PreparedStatement |
preparedRemoveSql
Variable to hold the remove() prepared statement. |
protected java.sql.PreparedStatement |
preparedSaveSql
Variable to hold the save() prepared statement. |
protected java.sql.PreparedStatement |
preparedSizeSql
Variable to hold the getSize() prepared statement. |
protected java.lang.String |
sessionDataCol
Data column to use. |
protected java.lang.String |
sessionIdCol
Id column to use. |
protected java.lang.String |
sessionLastAccessedCol
Last Accessed column to use. |
protected java.lang.String |
sessionMaxInactiveCol
Max Inactive column to use. |
protected java.lang.String |
sessionTable
Table to use. |
protected java.lang.String |
sessionValidCol
Is Valid column to use. |
protected static java.lang.String |
storeName
Name to register for this Store, used for logging. |
protected java.lang.String |
threadName
Name to register for the background thread. |
クラス org.apache.catalina.session.StoreBase から継承したフィールド |
checkInterval, debug, lifecycle, manager, sm, started, support, thread, threadDone |
インタフェース org.apache.catalina.Lifecycle から継承したフィールド |
START_EVENT, STOP_EVENT |
コンストラクタの概要 | |
JDBCStore()
|
メソッドの概要 | |
void |
clear()
Remove all of the Sessions in this Store. |
protected java.sql.Connection |
getConnection()
Check the connection associated with this store, if it's null or closed try to reopen it.
|
java.lang.String |
getConnectionURL()
Return the Connection URL for this Store. |
java.lang.String |
getDriverName()
Return the driver for this Store. |
java.lang.String |
getInfo()
Return the info for this Store. |
java.lang.String |
getSessionDataCol()
Return the data column for the table |
java.lang.String |
getSessionIdCol()
Return the Id column for the table. |
java.lang.String |
getSessionLastAccessedCol()
Return the Last Accessed column |
java.lang.String |
getSessionMaxInactiveCol()
Return the Max Inactive column |
java.lang.String |
getSessionTable()
Return the table for this Store. |
java.lang.String |
getSessionValidCol()
Return the Is Valid column |
int |
getSize()
Return an integer containing a count of all Sessions currently saved in this Store. |
java.lang.String |
getStoreName()
Return the name for this Store, used for logging. |
java.lang.String |
getThreadName()
Return the thread name for this Store. |
java.lang.String[] |
keys()
Return an array containing the session identifiers of all Sessions currently saved in this Store. |
Session |
load(java.lang.String id)
Load the Session associated with the id id .
|
protected void |
release(java.sql.Connection conn)
Release the connection, not needed here since the connection is not associated with a connection pool. |
void |
remove(java.lang.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 |
setConnectionURL(java.lang.String connectionURL)
Set the Connection URL for this Store. |
void |
setDriverName(java.lang.String driverName)
Set the driver for this Store. |
void |
setSessionDataCol(java.lang.String sessionDataCol)
Set the Data column for the table |
void |
setSessionIdCol(java.lang.String sessionIdCol)
Set the Id column for the table. |
void |
setSessionLastAccessedCol(java.lang.String sessionLastAccessedCol)
Set the Last Accessed column for the table |
void |
setSessionMaxInactiveCol(java.lang.String sessionMaxInactiveCol)
Set the Max Inactive column for the table |
void |
setSessionTable(java.lang.String sessionTable)
Set the table for this Store. |
void |
setSessionValidCol(java.lang.String sessionValidCol)
Set the Is Valid column for the table |
void |
start()
Called once when this Store is first started. |
void |
stop()
Gracefully terminate everything associated with our db. |
クラス org.apache.catalina.session.StoreBase から継承したメソッド |
addLifecycleListener, addPropertyChangeListener, getCheckInterval, getDebug, getManager, log, processExpires, removeLifecycleListener, removePropertyChangeListener, run, setCheckInterval, setDebug, setManager, threadSleep, threadStart, threadStop |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
インタフェース org.apache.catalina.Store から継承したメソッド |
addPropertyChangeListener, getManager, removePropertyChangeListener, setManager |
フィールドの詳細 |
protected static java.lang.String info
protected static java.lang.String storeName
protected java.lang.String threadName
protected java.lang.String connString
protected java.lang.String driverName
protected java.lang.String sessionTable
protected java.lang.String sessionIdCol
protected java.lang.String sessionDataCol
protected java.lang.String sessionValidCol
protected java.lang.String sessionMaxInactiveCol
protected java.lang.String sessionLastAccessedCol
protected java.sql.PreparedStatement preparedSizeSql
getSize()
prepared statement.protected java.sql.PreparedStatement preparedKeysSql
keys()
prepared statement.protected java.sql.PreparedStatement preparedSaveSql
save()
prepared statement.protected java.sql.PreparedStatement preparedClearSql
clear()
prepared statement.protected java.sql.PreparedStatement preparedRemoveSql
remove()
prepared statement.protected java.sql.PreparedStatement preparedLoadSql
load()
prepared statement.コンストラクタの詳細 |
public JDBCStore()
メソッドの詳細 |
public java.lang.String getInfo()
Store
内の getInfo
StoreBase
内の getInfo
public java.lang.String getThreadName()
StoreBase
内の getThreadName
public java.lang.String getStoreName()
StoreBase
内の getStoreName
public void setDriverName(java.lang.String driverName)
driverName
- The new driverpublic java.lang.String getDriverName()
public void setConnectionURL(java.lang.String connectionURL)
connectionURL
- The new Connection URLpublic java.lang.String getConnectionURL()
public void setSessionTable(java.lang.String sessionTable)
sessionTable
- The new tablepublic java.lang.String getSessionTable()
public void setSessionIdCol(java.lang.String sessionIdCol)
sessionIdCol
- the column namepublic java.lang.String getSessionIdCol()
public void setSessionDataCol(java.lang.String sessionDataCol)
sessionDataCol
- the column namepublic java.lang.String getSessionDataCol()
public void setSessionValidCol(java.lang.String sessionValidCol)
sessionValidCol
- The column namepublic java.lang.String getSessionValidCol()
public void setSessionMaxInactiveCol(java.lang.String sessionMaxInactiveCol)
sessionMaxInactiveCol
- The column namepublic java.lang.String getSessionMaxInactiveCol()
public void setSessionLastAccessedCol(java.lang.String sessionLastAccessedCol)
sessionLastAccessedCol
- The column namepublic java.lang.String getSessionLastAccessedCol()
public java.lang.String[] keys() throws java.io.IOException
Store
内の keys
java.io.IOException
- if an input/output error occurredpublic int getSize() throws java.io.IOException
0
is returned.Store
内の getSize
java.io.IOException
- if an input/output error occurredpublic Session load(java.lang.String id) throws java.lang.ClassNotFoundException, java.io.IOException
id
.
If no such session is found null
is returned.Store
内の load
id
- a value of type String
Session
java.lang.ClassNotFoundException
- if an error occursjava.io.IOException
- if an input/output error occurredpublic void remove(java.lang.String id) throws java.io.IOException
Store
内の remove
id
- Session identifier of the Session to be removedjava.io.IOException
- if an input/output error occurspublic void clear() throws java.io.IOException
Store
内の clear
java.io.IOException
- if an input/output error occurspublic void save(Session session) throws java.io.IOException
Store
内の save
session
- the session to be storedjava.io.IOException
- if an input/output error occursprotected java.sql.Connection getConnection()
null
or closed try to reopen it.
Returns null
if the connection could not be established.Connection
if the connection suceededprotected void release(java.sql.Connection conn)
conn
- The connection to be releasedpublic void start() throws LifecycleException
StoreBase
内の start
org.apache.catalina.session.StoreBase
からコピーされたタグ:java.lang.IllegalStateException
- if this component has already been
startedLifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic void stop() throws LifecycleException
StoreBase
内の stop
org.apache.catalina.session.StoreBase
からコピーされたタグ:java.lang.IllegalStateException
- if this component has not been startedLifecycleException
- if this component detects a fatal error
that needs to be reported
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |