init
This commit is contained in:
49
java/org/apache/catalina/session/Constants.java
Normal file
49
java/org/apache/catalina/session/Constants.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.catalina.session;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.catalina.Globals;
|
||||
import org.apache.catalina.valves.CrawlerSessionManagerValve;
|
||||
|
||||
/**
|
||||
* Manifest constants for the <code>org.apache.catalina.session</code>
|
||||
* package.
|
||||
*
|
||||
* @author Craig R. McClanahan
|
||||
*/
|
||||
|
||||
public class Constants {
|
||||
|
||||
/**
|
||||
* Set of session attribute names used internally by Tomcat that should
|
||||
* always be removed from the session before it is persisted, replicated or
|
||||
* equivalent.
|
||||
*/
|
||||
public static final Set<String> excludedAttributeNames;
|
||||
|
||||
static {
|
||||
Set<String> names = new HashSet<>();
|
||||
names.add(Globals.SUBJECT_ATTR);
|
||||
names.add(Globals.GSS_CREDENTIAL_ATTR);
|
||||
names.add(CrawlerSessionManagerValve.class.getName());
|
||||
excludedAttributeNames = Collections.unmodifiableSet(names);
|
||||
}
|
||||
}
|
||||
346
java/org/apache/catalina/session/FileStore.java
Normal file
346
java/org/apache/catalina/session/FileStore.java
Normal file
@@ -0,0 +1,346 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.catalina.session;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.apache.catalina.Context;
|
||||
import org.apache.catalina.Globals;
|
||||
import org.apache.catalina.Session;
|
||||
import org.apache.juli.logging.Log;
|
||||
|
||||
/**
|
||||
* Concrete implementation of the <b>Store</b> interface that utilizes
|
||||
* a file per saved Session in a configured directory. Sessions that are
|
||||
* saved are still subject to being expired based on inactivity.
|
||||
*
|
||||
* @author Craig R. McClanahan
|
||||
*/
|
||||
public final class FileStore extends StoreBase {
|
||||
|
||||
// ----------------------------------------------------- Constants
|
||||
|
||||
/**
|
||||
* The extension to use for serialized session filenames.
|
||||
*/
|
||||
private static final String FILE_EXT = ".session";
|
||||
|
||||
|
||||
// ----------------------------------------------------- Instance Variables
|
||||
|
||||
/**
|
||||
* The pathname of the directory in which Sessions are stored.
|
||||
* This may be an absolute pathname, or a relative path that is
|
||||
* resolved against the temporary work directory for this application.
|
||||
*/
|
||||
private String directory = ".";
|
||||
|
||||
|
||||
/**
|
||||
* A File representing the directory in which Sessions are stored.
|
||||
*/
|
||||
private File directoryFile = null;
|
||||
|
||||
|
||||
/**
|
||||
* Name to register for this Store, used for logging.
|
||||
*/
|
||||
private static final String storeName = "fileStore";
|
||||
|
||||
|
||||
/**
|
||||
* Name to register for the background thread.
|
||||
*/
|
||||
private static final String threadName = "FileStore";
|
||||
|
||||
|
||||
// ------------------------------------------------------------- Properties
|
||||
|
||||
/**
|
||||
* @return The directory path for this Store.
|
||||
*/
|
||||
public String getDirectory() {
|
||||
return directory;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the directory path for this Store.
|
||||
*
|
||||
* @param path The new directory path
|
||||
*/
|
||||
public void setDirectory(String path) {
|
||||
String oldDirectory = this.directory;
|
||||
this.directory = path;
|
||||
this.directoryFile = null;
|
||||
support.firePropertyChange("directory", oldDirectory, this.directory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return The thread name for this Store.
|
||||
*/
|
||||
public String getThreadName() {
|
||||
return threadName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the name for this Store, used for logging.
|
||||
*/
|
||||
@Override
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the number of Sessions present in this Store.
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
@Override
|
||||
public int getSize() throws IOException {
|
||||
// Acquire the list of files in our storage directory
|
||||
File dir = directory();
|
||||
if (dir == null) {
|
||||
return 0;
|
||||
}
|
||||
String files[] = dir.list();
|
||||
|
||||
// Figure out which files are sessions
|
||||
int keycount = 0;
|
||||
if (files != null) {
|
||||
for (String file : files) {
|
||||
if (file.endsWith(FILE_EXT)) {
|
||||
keycount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return keycount;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------- Public Methods
|
||||
|
||||
/**
|
||||
* Remove all of the Sessions in this Store.
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
@Override
|
||||
public void clear() throws IOException {
|
||||
String[] keys = keys();
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
remove(keys[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @exception IOException if an input/output error occurred
|
||||
*/
|
||||
@Override
|
||||
public String[] keys() throws IOException {
|
||||
// Acquire the list of files in our storage directory
|
||||
File dir = directory();
|
||||
if (dir == null) {
|
||||
return new String[0];
|
||||
}
|
||||
String files[] = dir.list();
|
||||
|
||||
// Bugzilla 32130
|
||||
if (files == null || files.length < 1) {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
// Build and return the list of session identifiers
|
||||
List<String> list = new ArrayList<>();
|
||||
int n = FILE_EXT.length();
|
||||
for (String file : files) {
|
||||
if (file.endsWith(FILE_EXT)) {
|
||||
list.add (file.substring(0, file.length() - n));
|
||||
}
|
||||
}
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load and return the Session associated with the specified session
|
||||
* identifier from this Store, without removing it. If there is no
|
||||
* such stored Session, return <code>null</code>.
|
||||
*
|
||||
* @param id Session identifier of the session to load
|
||||
*
|
||||
* @exception ClassNotFoundException if a deserialization error occurs
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
@Override
|
||||
public Session load(String id) throws ClassNotFoundException, IOException {
|
||||
// Open an input stream to the specified pathname, if any
|
||||
File file = file(id);
|
||||
if (file == null || !file.exists()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Context context = getManager().getContext();
|
||||
Log contextLog = context.getLogger();
|
||||
|
||||
if (contextLog.isDebugEnabled()) {
|
||||
contextLog.debug(sm.getString(getStoreName()+".loading", id, file.getAbsolutePath()));
|
||||
}
|
||||
|
||||
ClassLoader oldThreadContextCL = context.bind(Globals.IS_SECURITY_ENABLED, null);
|
||||
|
||||
try (FileInputStream fis = new FileInputStream(file.getAbsolutePath());
|
||||
ObjectInputStream ois = getObjectInputStream(fis)) {
|
||||
|
||||
StandardSession session = (StandardSession) manager.createEmptySession();
|
||||
session.readObjectData(ois);
|
||||
session.setManager(manager);
|
||||
return session;
|
||||
} catch (FileNotFoundException e) {
|
||||
if (contextLog.isDebugEnabled()) {
|
||||
contextLog.debug("No persisted data file found");
|
||||
}
|
||||
return null;
|
||||
} finally {
|
||||
context.unbind(Globals.IS_SECURITY_ENABLED, oldThreadContextCL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the Session with the specified session identifier from
|
||||
* this Store, if present. If no such Session is present, this method
|
||||
* takes no action.
|
||||
*
|
||||
* @param id Session identifier of the Session to be removed
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
@Override
|
||||
public void remove(String id) throws IOException {
|
||||
File file = file(id);
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
if (manager.getContext().getLogger().isDebugEnabled()) {
|
||||
manager.getContext().getLogger().debug(sm.getString(getStoreName() + ".removing",
|
||||
id, file.getAbsolutePath()));
|
||||
}
|
||||
|
||||
if (file.exists() && !file.delete()) {
|
||||
throw new IOException(sm.getString("fileStore.deleteSessionFailed", file));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save the specified Session into this Store. Any previously saved
|
||||
* information for the associated session identifier is replaced.
|
||||
*
|
||||
* @param session Session to be saved
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
@Override
|
||||
public void save(Session session) throws IOException {
|
||||
// Open an output stream to the specified pathname, if any
|
||||
File file = file(session.getIdInternal());
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
if (manager.getContext().getLogger().isDebugEnabled()) {
|
||||
manager.getContext().getLogger().debug(sm.getString(getStoreName() + ".saving",
|
||||
session.getIdInternal(), file.getAbsolutePath()));
|
||||
}
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(file.getAbsolutePath());
|
||||
ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(fos))) {
|
||||
((StandardSession)session).writeObjectData(oos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------- Private Methods
|
||||
|
||||
/**
|
||||
* Return a File object representing the pathname to our
|
||||
* session persistence directory, if any. The directory will be
|
||||
* created if it does not already exist.
|
||||
*/
|
||||
private File directory() throws IOException {
|
||||
if (this.directory == null) {
|
||||
return null;
|
||||
}
|
||||
if (this.directoryFile != null) {
|
||||
// NOTE: Race condition is harmless, so do not synchronize
|
||||
return this.directoryFile;
|
||||
}
|
||||
File file = new File(this.directory);
|
||||
if (!file.isAbsolute()) {
|
||||
Context context = manager.getContext();
|
||||
ServletContext servletContext = context.getServletContext();
|
||||
File work = (File) servletContext.getAttribute(ServletContext.TEMPDIR);
|
||||
file = new File(work, this.directory);
|
||||
}
|
||||
if (!file.exists() || !file.isDirectory()) {
|
||||
if (!file.delete() && file.exists()) {
|
||||
throw new IOException(sm.getString("fileStore.deleteFailed", file));
|
||||
}
|
||||
if (!file.mkdirs() && !file.isDirectory()) {
|
||||
throw new IOException(sm.getString("fileStore.createFailed", file));
|
||||
}
|
||||
}
|
||||
this.directoryFile = file;
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a File object representing the pathname to our
|
||||
* session persistence file, if any.
|
||||
*
|
||||
* @param id The ID of the Session to be retrieved. This is
|
||||
* used in the file naming.
|
||||
*/
|
||||
private File file(String id) throws IOException {
|
||||
if (this.directory == null) {
|
||||
return null;
|
||||
}
|
||||
String filename = id + FILE_EXT;
|
||||
File file = new File(directory(), filename);
|
||||
return file;
|
||||
}
|
||||
}
|
||||
1061
java/org/apache/catalina/session/JDBCStore.java
Normal file
1061
java/org/apache/catalina/session/JDBCStore.java
Normal file
File diff suppressed because it is too large
Load Diff
86
java/org/apache/catalina/session/LocalStrings.properties
Normal file
86
java/org/apache/catalina/session/LocalStrings.properties
Normal file
@@ -0,0 +1,86 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.SQLException=SQL Error [{0}]
|
||||
JDBCStore.checkConnectionClassNotFoundException=JDBC driver class not found [{0}]
|
||||
JDBCStore.checkConnectionDBClosed=The database connection is null or was found to be closed. Trying to re-open it.
|
||||
JDBCStore.checkConnectionDBReOpenFail=The re-open on the database failed. The database could be down.
|
||||
JDBCStore.checkConnectionSQLException=A SQL exception occurred [{0}]
|
||||
JDBCStore.close=Exception closing database connection [{0}]
|
||||
JDBCStore.commitSQLException=SQLException committing connection before closing
|
||||
JDBCStore.loading=Loading Session [{0}] from database [{1}]
|
||||
JDBCStore.missingDataSourceName=No valid JNDI name was given.
|
||||
JDBCStore.removing=Removing Session [{0}] at database [{1}]
|
||||
JDBCStore.saving=Saving Session [{0}] to database [{1}]
|
||||
JDBCStore.wrongDataSource=Cannot open JNDI DataSource [{0}]
|
||||
|
||||
fileStore.createFailed=Unable to create directory [{0}] for the storage of session data
|
||||
fileStore.deleteFailed=Unable to delete file [{0}] which is preventing the creation of the session storage location
|
||||
fileStore.deleteSessionFailed=Unable to delete file [{0}] which is no longer required
|
||||
fileStore.loading=Loading Session [{0}] from file [{1}]
|
||||
fileStore.removing=Removing Session [{0}] at file [{1}]
|
||||
fileStore.saving=Saving Session [{0}] to file [{1}]
|
||||
|
||||
managerBase.container.noop=Managers added to containers other than Contexts will never be used
|
||||
managerBase.contextNull=The Context must be set to a non-null value before the Manager is used
|
||||
managerBase.createSession.ise=createSession: Too many active sessions
|
||||
managerBase.sessionAttributeNameFilter=Skipped session attribute named [{0}] because it did not match the name filter [{1}]
|
||||
managerBase.sessionAttributeValueClassNameFilter=Skipped session attribute named [{0}] because the value type [{1}] did not match the filter [{2}]
|
||||
managerBase.sessionNotFound=The session [{0}] was not found
|
||||
managerBase.sessionTimeout=Invalid session timeout setting [{0}]
|
||||
managerBase.setContextNotNew=It is illegal to call setContext() to change the Context associated with a Manager if the Manager is not in the NEW state
|
||||
|
||||
persistentManager.backupMaxIdle=Backing up session [{0}] to Store, idle for [{1}] seconds
|
||||
persistentManager.deserializeError=Error deserializing Session [{0}]
|
||||
persistentManager.loading=Loading [{0}] persisted sessions
|
||||
persistentManager.serializeError=Error serializing Session [{0}]: [{1}]
|
||||
persistentManager.storeKeysException=Unable to determine the list of session IDs for sessions in the session store, assuming that the store is empty
|
||||
persistentManager.storeSizeException=Unable to determine the number of sessions in the session store, assuming that the store is empty
|
||||
persistentManager.swapIn=Swapping session [{0}] in from Store
|
||||
persistentManager.swapInException=Exception in the Store during swapIn: [{0}]
|
||||
persistentManager.swapInInvalid=Swapped session [{0}] is invalid
|
||||
persistentManager.swapMaxIdle=Swapping session [{0}] to Store, idle for [{1}] seconds
|
||||
persistentManager.swapTooManyActive=Swapping out session [{0}], idle for [{1}] seconds too many sessions active
|
||||
persistentManager.tooManyActive=Too many active sessions, [{0}], looking for idle sessions to swap out
|
||||
persistentManager.unloading=Saving [{0}] persisted sessions
|
||||
|
||||
standardManager.deletePersistedFileFail=Unable to delete [{0}] after reading the persisted sessions. The continued presence of this file may cause future attempts to persist sessions to fail.
|
||||
standardManager.loading=Loading persisted sessions from [{0}]
|
||||
standardManager.loading.exception=Exception while loading persisted sessions
|
||||
standardManager.managerLoad=Exception loading sessions from persistent storage
|
||||
standardManager.managerUnload=Exception unloading sessions to persistent storage
|
||||
standardManager.unloading=Saving persisted sessions to [{0}]
|
||||
standardManager.unloading.debug=Unloading persisted sessions
|
||||
standardManager.unloading.nosessions=No persisted sessions to unload
|
||||
|
||||
standardSession.attributeEvent=Session attribute event listener threw exception
|
||||
standardSession.bindingEvent=Session binding event listener threw exception
|
||||
standardSession.getAttribute.ise=getAttribute: Session already invalidated
|
||||
standardSession.getAttributeNames.ise=getAttributeNames: Session already invalidated
|
||||
standardSession.getCreationTime.ise=getCreationTime: Session already invalidated
|
||||
standardSession.getIdleTime.ise=getIdleTime: Session already invalidated
|
||||
standardSession.getLastAccessedTime.ise=getLastAccessedTime: Session already invalidated
|
||||
standardSession.getThisAccessedTime.ise=getThisAccessedTime: Session already invalidated
|
||||
standardSession.getValueNames.ise=getValueNames: Session already invalidated
|
||||
standardSession.invalidate.ise=invalidate: Session already invalidated
|
||||
standardSession.isNew.ise=isNew: Session already invalidated
|
||||
standardSession.logoutfail=Exception logging out user when expiring session
|
||||
standardSession.notDeserializable=Cannot deserialize session attribute [{0}] for session [{1}]
|
||||
standardSession.notSerializable=Cannot serialize session attribute [{0}] for session [{1}]
|
||||
standardSession.removeAttribute.ise=removeAttribute: Session already invalidated
|
||||
standardSession.sessionEvent=Session event listener threw exception
|
||||
standardSession.setAttribute.iae=setAttribute: Non-serializable attribute [{0}]
|
||||
standardSession.setAttribute.ise=setAttribute: Session [{0}] has already been invalidated
|
||||
standardSession.setAttribute.namenull=setAttribute: name parameter cannot be null
|
||||
31
java/org/apache/catalina/session/LocalStrings_de.properties
Normal file
31
java/org/apache/catalina/session/LocalStrings_de.properties
Normal file
@@ -0,0 +1,31 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.missingDataSourceName=Kein gültiger JNDI Namen wurde übergeben.
|
||||
JDBCStore.saving=Speichere Session [{0}] in Datenbank [{1}]
|
||||
|
||||
fileStore.deleteFailed=Kann Datei [{0}] nicht löschen. Das verhindert das Erzeugen des Ablageortes für die Session-Ablage
|
||||
|
||||
managerBase.contextNull=Der Context muss auf einen nicht-null Wert gesetzt sein, bevor der Manager benutzt werden kann
|
||||
|
||||
persistentManager.storeKeysException=Kann die Liste der Session IDs für die Sessions in der Session-Ablage nicht ermitteln, nehme an, dass die Ablage leer ist.
|
||||
persistentManager.storeSizeException=Konnte die Anzahl der Sessions im Session-Store nicht ermitteln, gehe davon aus, dass der Store leer ist.
|
||||
persistentManager.swapTooManyActive=Lagere Session [{0}] aus, Untätig seit [{1}] Sekunden und zu viele Sessions aktiv
|
||||
|
||||
standardManager.loading.exception=Ausnahme beim Laden der persistierten Sitzungen
|
||||
standardManager.managerLoad=Ausnahme beim Laden der Sitzungen aus dem Persistenten Speicher
|
||||
standardManager.managerUnload=Fehler beim Entladen der Session zu persistenten Speicher
|
||||
|
||||
standardSession.notSerializable=Kann Session Attribut [{0}] für Sitzung [{1}] nicht serialisieren
|
||||
70
java/org/apache/catalina/session/LocalStrings_es.properties
Normal file
70
java/org/apache/catalina/session/LocalStrings_es.properties
Normal file
@@ -0,0 +1,70 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.SQLException=Error SQL [{0}]
|
||||
JDBCStore.checkConnectionClassNotFoundException=No se ha hallado la clase del manejador (driver) JDBC [{0}]
|
||||
JDBCStore.checkConnectionDBClosed=La conexióna a base de datos es nula o está cerrada. Intentando reabrirla.
|
||||
JDBCStore.checkConnectionDBReOpenFail=Falló la reapertura de la base de datos. Puede que la base de datos esté caída.
|
||||
JDBCStore.checkConnectionSQLException=Ha tenido lugar una excepción SQL [{0}]
|
||||
JDBCStore.close=Excepción cerrando conexión a base de datos [{0}]
|
||||
JDBCStore.loading=Cargando Sesión [{0}] desde base de datos [{1}]
|
||||
JDBCStore.missingDataSourceName=No se proporcionó un nombre JNDI válido
|
||||
JDBCStore.removing=Quitando Sesión [{0}] en base de datos [{1}]
|
||||
JDBCStore.saving=Salvando Sesión [{0}] en base de datos [{1}]
|
||||
|
||||
fileStore.loading=Cargando Sesión [{0}] desde archivo [{1}]
|
||||
fileStore.removing=Quitando Sesión [{0}] en archivo [{1}]
|
||||
fileStore.saving=Salvando Sesión [{0}] en archivo [{1}]
|
||||
|
||||
managerBase.contextNull=El Çontexto debe ser fijado a un valor no nulo antes the fijar el Gerenciador
|
||||
managerBase.createSession.ise=createSession: Demasiadas sesiones activas
|
||||
managerBase.sessionTimeout=Valor inválido de Tiempo Agotado de sesión [{0}]
|
||||
managerBase.setContextNotNew=Es ilegal llamar a setContext() para cambiar el Contexto associado con un Manejador si el Manejador no esta en el estado NEW.
|
||||
|
||||
persistentManager.backupMaxIdle=Respaldando sesión [{0}] a Almacén, ociosa durante [{1}] segundos
|
||||
persistentManager.deserializeError=Error des-serializando Sesión [{0}]: [{1}]
|
||||
persistentManager.loading=Cargando [{0}] sesiones persistidas
|
||||
persistentManager.serializeError=Error serializando Sesión [{0}]: [{1}]
|
||||
persistentManager.storeKeysException=Imposible determinar la lista de IDs de sesiones en la tienda de sesiones, asumiendo que la tienda esta vacia
|
||||
persistentManager.storeSizeException=No se puede determinar el numero de sesiones en el almacenamiento de sesiones, asumiendo que el almacenamiento esta vacío
|
||||
persistentManager.swapIn=Intercambiando sesión [{0}] a dentro desde Almacén
|
||||
persistentManager.swapMaxIdle=Intercambiando sesión [{0}] a fuera a Almacén, ociosa durante [{1}] segundos
|
||||
persistentManager.swapTooManyActive=Intercambiando sesión [{0}] a fuera, ociosa durante [{1}] segundos: Demasiadas sesiones activas
|
||||
persistentManager.tooManyActive=Demasiadas sesiones activas, [{0}], buscando sesiones ociosas para intercambiar
|
||||
persistentManager.unloading=Salvando [{0}] sesiones persistidas
|
||||
|
||||
standardManager.deletePersistedFileFail=Imposible borrar [{0}] luego de leer las sessiones persistentes. La prensencia continua de este archivo causará que los intentos futuros de sesiones persistentes fallen.
|
||||
standardManager.loading=Cargando sesiones persistidas desde [{0}]
|
||||
standardManager.loading.exception=Exception al cargar sesiones persistidas
|
||||
standardManager.managerLoad=Excepción cargando sesiones desde almacenamiento persistente
|
||||
standardManager.managerUnload=Excepción descargando sesiones a almacenamiento persistente
|
||||
standardManager.unloading=Salvando sesiones persistidas a [{0}]
|
||||
|
||||
standardSession.attributeEvent=El oyente de eventos de atributo de Sesión lanzó una excepción
|
||||
standardSession.bindingEvent=El oyente de eventos de ligado de Sesión lanzó una excepción
|
||||
standardSession.getAttribute.ise=getAttribute: La Sesión ya ha sido invalidada
|
||||
standardSession.getAttributeNames.ise=getAttributeNames: La Sesión ya ha sido invalidada
|
||||
standardSession.getCreationTime.ise=getCreationTime: La Sesión ya ha sido invalidada
|
||||
standardSession.getLastAccessedTime.ise=getLastAccessedTime: La Sesión ya ha sido invalidada
|
||||
standardSession.getThisAccessedTime.ise=getThisAccessedTime: La Sesión ya ha sido invalidada
|
||||
standardSession.getValueNames.ise=getValueNames: La Sesión ya ha sido invalidada
|
||||
standardSession.invalidate.ise=invalidate: La Sesión ya ha sido invalidada
|
||||
standardSession.isNew.ise=isNew: La Sesión ya ha sido invalidada
|
||||
standardSession.notSerializable=No puedo serializar atributo de sesión [{0}] para sesión [{1}]
|
||||
standardSession.removeAttribute.ise=removeAttribute: La Sesión ya ha sido invalidada
|
||||
standardSession.sessionEvent=El oyente de evento de Sesión lanzó una execpción
|
||||
standardSession.setAttribute.iae=setAttribute: Atributo [{0}] no serializable
|
||||
standardSession.setAttribute.ise=setAttribute: La Sesión ya ha sido invalidada
|
||||
standardSession.setAttribute.namenull=setAttribute: el nuevo parámetro no puede ser nulo
|
||||
86
java/org/apache/catalina/session/LocalStrings_fr.properties
Normal file
86
java/org/apache/catalina/session/LocalStrings_fr.properties
Normal file
@@ -0,0 +1,86 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.SQLException=Erreur SQL [{0}]
|
||||
JDBCStore.checkConnectionClassNotFoundException=La classe du driver JDBC n''a pas été trouvée [{0}]
|
||||
JDBCStore.checkConnectionDBClosed=La connexion à la base de données est nulle ou a été trouvée fermée. Tentative de réouverture.
|
||||
JDBCStore.checkConnectionDBReOpenFail=La tentative de réouverture de la base de données a échoué. La base de données est peut-être arrêtée.
|
||||
JDBCStore.checkConnectionSQLException=Une exception SQL s''est produite [{0}]
|
||||
JDBCStore.close=Exception lors de la fermeture de la connection vers la base de donnée [{0}]
|
||||
JDBCStore.commitSQLException=Une SQLException a été retournée lors du commit de la connection avant sa fermeture
|
||||
JDBCStore.loading=Chargement de la Session [{0}] depuis la base de données [{1}]
|
||||
JDBCStore.missingDataSourceName=Aucun nom JNDI valide n'a été donné.
|
||||
JDBCStore.removing=Retrait de la Session [{0}] de la base de données [{1}]
|
||||
JDBCStore.saving=Sauvegarde de la Session [{0}] vers la base de données [{1}]
|
||||
JDBCStore.wrongDataSource=Impossible d''ouvrir la DataSource JNDI [{0}]
|
||||
|
||||
fileStore.createFailed=Impossible de créer le répertoire [{0}] pour stocker les données de session
|
||||
fileStore.deleteFailed=Impossible d''effacer le fichier [{0}] qui empêche la création du support de stockage de sessions
|
||||
fileStore.deleteSessionFailed=Impossible d''effacer le fichier [{0}] qui n''est plus nécessaire
|
||||
fileStore.loading=Chargement de la Session [{0}] depuis le fichier [{1}]
|
||||
fileStore.removing=Retrait de la Session [{0}] du fichier [{1}]
|
||||
fileStore.saving=Sauvegarde de la Session [{0}] vers le fichier [{1}]
|
||||
|
||||
managerBase.container.noop=Les gestionnaires de session ajoutés à des conteneurs qui ne sont pas des contextes ne seront jamais utilisés
|
||||
managerBase.contextNull=Le contexte (Context) doit être mis à une valeur non-nulle avant l'usage du Manager
|
||||
managerBase.createSession.ise="createSession": Trop de sessions actives
|
||||
managerBase.sessionAttributeNameFilter=L''attribut de session nommé [{0}] sera sauté car il ne correspond pas au filtre sur les noms [{1}]
|
||||
managerBase.sessionAttributeValueClassNameFilter=L''attribut de session nommé [{0}] a été passé parce que le type [{1}] de la valeur ne correspond pas au filtre [{2}]
|
||||
managerBase.sessionNotFound=La session [{0}] n''a pas été trouvée
|
||||
managerBase.sessionTimeout=Réglage du délai d''inactivité (timeout) de session invalide [{0}]
|
||||
managerBase.setContextNotNew=Il est illégal d'appeler setContext() pour changer le contexte associé avec un gestionnaire (Manager) si le genstionnaire n'est pas dans l'état nouveau
|
||||
|
||||
persistentManager.backupMaxIdle=Sauvegarde de la session [{0}] vers le stockage (Store), en attente pour [{1}] secondes
|
||||
persistentManager.deserializeError=Erreur lors de la désérialisation de la session [{0}]
|
||||
persistentManager.loading=Chargement de [{0}] sessions persistantes
|
||||
persistentManager.serializeError=Erreur lors de la sérialisation de la session [{0}]: [{1}]
|
||||
persistentManager.storeKeysException=Incapacité de déterminer la liste des ID de session, pour les sessions dans le magasin de sessions. Supposant le magasin vide.
|
||||
persistentManager.storeSizeException=Impossible de déterminer le nombre de sessions dans le magasin de sessions, le magasin doit être vide.
|
||||
persistentManager.swapIn=Basculement depuis le stockage (swap in) de la session [{0}]
|
||||
persistentManager.swapInException=Exception dans la Store lors du swapIn: [{0}]
|
||||
persistentManager.swapInInvalid=La session échangée [{0}] est invalide
|
||||
persistentManager.swapMaxIdle=Basculement de la session [{0}] vers le stockage (Store), en attente pour [{1}] secondes
|
||||
persistentManager.swapTooManyActive=Basculement vers stockage (swap out) de la session [{0}], en attente pour [{1}] secondes trop de sessions actives
|
||||
persistentManager.tooManyActive=Trop de sessions actives, [{0}], à la recherche de sessions en attente pour basculement vers stockage (swap out)
|
||||
persistentManager.unloading=Sauvegarde de [{0}] sessions persistantes
|
||||
|
||||
standardManager.deletePersistedFileFail=Impossible de supprimer [{0}] après avoir lu les sessions persistées, cela pourrait empêcher la future persistance des sessions
|
||||
standardManager.loading=Chargement des sessions qui ont persisté depuis [{0}]
|
||||
standardManager.loading.exception="Exception" lors du chargement de sessions persistantes
|
||||
standardManager.managerLoad=Exception au chargement des sessions depuis le stockage persistant (persistent storage)
|
||||
standardManager.managerUnload=Exception au déchargement des sessions vers le stockage persistant (persistent storage)
|
||||
standardManager.unloading=Sauvegarde des sessions ayant persisté vers [{0}]
|
||||
standardManager.unloading.debug=Déchargement des session persistées
|
||||
standardManager.unloading.nosessions=Aucune session persistée à décharger
|
||||
|
||||
standardSession.attributeEvent=L'écouteur d'évènement Attribut de Session (attribute event listener) a généré une exception
|
||||
standardSession.bindingEvent=L'écouteur d'évènements d'association de session a renvoyé une exception
|
||||
standardSession.getAttribute.ise="getAttribute": Session déjà invalidée
|
||||
standardSession.getAttributeNames.ise="getAttributeNames": Session déjà invalidée
|
||||
standardSession.getCreationTime.ise="getCreationTime": Session déjà invalidée
|
||||
standardSession.getIdleTime.ise=getIdleTime: la session a déjà été invalidée
|
||||
standardSession.getLastAccessedTime.ise="getLastAccessedTime": Session déjà invalidée
|
||||
standardSession.getThisAccessedTime.ise="getThisAccessedTime": Session déjà invalidée
|
||||
standardSession.getValueNames.ise="getValueNames": Session déjà invalidée
|
||||
standardSession.invalidate.ise="invalidate": Session déjà invalidée
|
||||
standardSession.isNew.ise="isNew": Session déjà invalidée
|
||||
standardSession.logoutfail=Exception lors de la déconnection de l'utilisateur, lors de l'expiration de la session
|
||||
standardSession.notDeserializable=Impossible de désérialiser l''attribut de session [{0}] pour la session [{1}]
|
||||
standardSession.notSerializable=Impossible de sérialiser l''attribut de session [{0}] pour la session [{1}]
|
||||
standardSession.removeAttribute.ise="removeAttribute": Session déjà invalidée
|
||||
standardSession.sessionEvent=L'écouteur d'évènement de session (session event listener) a généré une exception
|
||||
standardSession.setAttribute.iae="setAttribute": Attribut [{0}] non sérialisable
|
||||
standardSession.setAttribute.ise="setAttribute": Session déjà invalidée
|
||||
standardSession.setAttribute.namenull="setAttribute": le nom de paramètre ne peut être nul
|
||||
86
java/org/apache/catalina/session/LocalStrings_ja.properties
Normal file
86
java/org/apache/catalina/session/LocalStrings_ja.properties
Normal file
@@ -0,0 +1,86 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.SQLException=SQLエラー [{0}]
|
||||
JDBCStore.checkConnectionClassNotFoundException=JDBCドライバクラスが見つかりません [{0}]
|
||||
JDBCStore.checkConnectionDBClosed=データベース接続がnullであるか、クローズされているのが見つかりました。再オープンしてください。
|
||||
JDBCStore.checkConnectionDBReOpenFail=データベースの再オープンが失敗しました。データベースがダウンしているかもしれません。
|
||||
JDBCStore.checkConnectionSQLException=SQL例外が発生しました [{0}]
|
||||
JDBCStore.close=データベース接続 [{0}] をクローズ中の例外です
|
||||
JDBCStore.commitSQLException=クローズする前に接続をコミットするSQLException
|
||||
JDBCStore.loading=セッション [{0}] をデータベース [{1}] からロードします
|
||||
JDBCStore.missingDataSourceName=指定された JNDI 名は正常ではありません
|
||||
JDBCStore.removing=セッション [{0}] をデータベース [{1}] から削除します
|
||||
JDBCStore.saving=セッション [{0}] をデータベース [{1}] に保存します
|
||||
JDBCStore.wrongDataSource=JNDIデータソース[{0}]を開くことができません。
|
||||
|
||||
fileStore.createFailed=セッションデータを格納するディレクトリ[{0}]を作成できません
|
||||
fileStore.deleteFailed=ファイル [{0}] を削除できなかったため、セッションストレージを作成できません。
|
||||
fileStore.deleteSessionFailed=不要になったファイル[{0}]を削除できません
|
||||
fileStore.loading=セッション [{0}] をファイル [{1}] からロードします
|
||||
fileStore.removing=セッション [{0}] をファイル [{1}] から削除します
|
||||
fileStore.saving=セッション [{0}] をファイル [{1}] に保存します
|
||||
|
||||
managerBase.container.noop=Contexts 以外のコンテナに追加されたManagerは決して使用されません。
|
||||
managerBase.contextNull=マネージャーが使う前のコンテキストは null でなければなりません。
|
||||
managerBase.createSession.ise=createSession: アクティブセッションが多すぎます
|
||||
managerBase.sessionAttributeNameFilter=名前フィルタ[{1}]と一致しなかったため、[{0}]というセッション属性をスキップしました。
|
||||
managerBase.sessionAttributeValueClassNameFilter=値タイプ[{1}]がフィルタ[{2}]と一致しなかったため、[{0}]という名前のセッション属性をスキップしました。
|
||||
managerBase.sessionNotFound=セッション [{0}] が見つかりません。
|
||||
managerBase.sessionTimeout=無効なセッションタイムアウト設定です [{0}]
|
||||
managerBase.setContextNotNew=NEW 状態ではないマネージャーに関連付けられた Context を変更するために setContext() を呼び出すことは禁止されています。
|
||||
|
||||
persistentManager.backupMaxIdle=[{1}]秒間アイドルしているセッション [{0}] を保存するためにバックアップしています
|
||||
persistentManager.deserializeError=セッション [{0}] をデシリアライズ中のエラーです。
|
||||
persistentManager.loading=[{0}] の持続されたセッションをロードします
|
||||
persistentManager.serializeError=セッション [{0}] をシリアライズ中のエラーです: [{1}]
|
||||
persistentManager.storeKeysException=セッションストアからセッションIDのリストを取得できませんでした。セッションストアが空の可能性があります。
|
||||
persistentManager.storeSizeException=セッションストアに格納しているセッションの総数を確認できなかったため、セッションストアは空になっているものとして扱います。
|
||||
persistentManager.swapIn=セッション [{0}] をスワップインしています
|
||||
persistentManager.swapInException=スワップイン時のストア内の例外:[{0}]
|
||||
persistentManager.swapInInvalid=スワップしたセッション [{0}] は不正です。
|
||||
persistentManager.swapMaxIdle=[{1}]秒間アイドルしているセッション [{0}] を保存するためにスワップしています
|
||||
persistentManager.swapTooManyActive=セッションが多すぎるので、[{1}]秒アイドルしているセッション [{0}] をスワップアウトします
|
||||
persistentManager.tooManyActive=アクティブセッションが多すぎます、[{0}]、スワップアウトするためにアイドルセッションを探しています
|
||||
persistentManager.unloading=[{0}] の持続されたセッションを保存します
|
||||
|
||||
standardManager.deletePersistedFileFail=永続化セッションを読み込んだ [{0}] を削減できません。ファイルが残っていると将来セッションの永続化に失敗する可能性があります。
|
||||
standardManager.loading=[{0}] から持続されたセッションをロードしています
|
||||
standardManager.loading.exception=持続されたセッションをロード中にExceptionが発生しました
|
||||
standardManager.managerLoad=永続記憶装置からセッションをロード中の例外です
|
||||
standardManager.managerUnload=永続記憶装置にセッションをアンロード中の例外です
|
||||
standardManager.unloading=持続されたセッションを [{0}] に保存します
|
||||
standardManager.unloading.debug=永続セッションのアンロード
|
||||
standardManager.unloading.nosessions=アンロードする永続セッションがありません
|
||||
|
||||
standardSession.attributeEvent=セッション属性イベントリスナが例外を投げました
|
||||
standardSession.bindingEvent=セッションバインディングイベントリスナが例外を投げました
|
||||
standardSession.getAttribute.ise=getAttribute: セッションは既に無効化されています
|
||||
standardSession.getAttributeNames.ise=getAttributeNames: セッションは既に無効化されています
|
||||
standardSession.getCreationTime.ise=getCreationTime: セッションは既に無効化されています
|
||||
standardSession.getIdleTime.ise=getIdleTime: 無効なセッションです。
|
||||
standardSession.getLastAccessedTime.ise=getLastAccessedTime: セッションは既に無効化されています
|
||||
standardSession.getThisAccessedTime.ise=getThisAccessedTime: セッションは既に無効化されています
|
||||
standardSession.getValueNames.ise=getValueNames: セッションは既に無効化されています
|
||||
standardSession.invalidate.ise=invalidate: セッションは既に無効化されています
|
||||
standardSession.isNew.ise=isNew: セッションは既に無効化されています
|
||||
standardSession.logoutfail=有効期限を超過したセッションからユーザーがログアウトする時、例外が発生しました。
|
||||
standardSession.notDeserializable=セッション[{1}]のセッション属性[{0}]をデシリアライズできません。
|
||||
standardSession.notSerializable=セッション [{1}] のためにセッション属性 [{0}] をシリアライズできません
|
||||
standardSession.removeAttribute.ise=removeAttribute: セッションは既に無効化されています
|
||||
standardSession.sessionEvent=セッションイベントリスナが例外を投げました
|
||||
standardSession.setAttribute.iae=setAttribute: シリアライズできない属性です
|
||||
standardSession.setAttribute.ise=setAttribute: セッションは既に無効化されています
|
||||
standardSession.setAttribute.namenull=setAttribute: nameパラメタはnullであってはいけません
|
||||
86
java/org/apache/catalina/session/LocalStrings_ko.properties
Normal file
86
java/org/apache/catalina/session/LocalStrings_ko.properties
Normal file
@@ -0,0 +1,86 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.SQLException=SQL 오류 [{0}]
|
||||
JDBCStore.checkConnectionClassNotFoundException=JDBC 드라이버 클래스를 찾을 수 없습니다: [{0}]
|
||||
JDBCStore.checkConnectionDBClosed=데이터베이스 연결이 널이거나 닫힌 상태입니다. 다시 열려고 시도합니다.
|
||||
JDBCStore.checkConnectionDBReOpenFail=데이터베이스에 대해 다시 연결을 맺지 못했습니다. 데이터베이스가 다운되었을 수 있습니다.
|
||||
JDBCStore.checkConnectionSQLException=SQL 예외 발생 [{0}]
|
||||
JDBCStore.close=데이터베이스 연결 [{0}]을(를) 닫는 동안 예외 발생
|
||||
JDBCStore.commitSQLException=데이터베이스 연결을 닫기 전, 커밋을 시도하는 중 SQLException 발생
|
||||
JDBCStore.loading=데이터베이스 [{1}](으)로부터 세션 [{0}]을(를) 로드합니다.
|
||||
JDBCStore.missingDataSourceName=유효한 JNDI 이름이 주어지지 않았습니다.
|
||||
JDBCStore.removing=데이터베이스 [{1}]에서 세션 [{0}]을(를) 제거합니다.
|
||||
JDBCStore.saving=세션 [{0}]을(를) 데이터베이스 [{1}]에 저장합니다.
|
||||
JDBCStore.wrongDataSource=JNDI DataSource [{0}]을(를) 열 수 없습니다.
|
||||
|
||||
fileStore.createFailed=세션 데이터 저장소를 위한 디렉토리[{0}]을(를) 생성할 수 없습니다.
|
||||
fileStore.deleteFailed=파일 [{0}]을(를) 삭제할 수 없습니다. 이는 세션 저장소 위치의 생성을 방해하고 있습니다.
|
||||
fileStore.deleteSessionFailed=더 이상 필요하지 않은 파일 [{0}]을(를) 삭제할 수 없습니다.
|
||||
fileStore.loading=파일 [{1}](으)로부터 세션 [{0}]을(를) 로드합니다.
|
||||
fileStore.removing=파일 [{1}]에 저장된 세션 [{0}]을(를) 제거합니다.
|
||||
fileStore.saving=세션 [{0}]을(를) 파일 [{1}]에 저장합니다.
|
||||
|
||||
managerBase.container.noop=컨텍스트들이 아닌, 컨테이너들에 추가된 매니저들은 전혀 사용되지 않을 것입니다.
|
||||
managerBase.contextNull=매니저가 사용되기 전에, 컨텍스트가 반드시 널이 아닌 값으로 설정되어야 합니다.
|
||||
managerBase.createSession.ise=createSession: 활성화된 세션이 너무 많습니다.
|
||||
managerBase.sessionAttributeNameFilter=이름 필터 [{1}]와(과) 부합되지 않기 때문에, [{0}](이)라는 이름의 세션 속성을 건너뛰었습니다.
|
||||
managerBase.sessionAttributeValueClassNameFilter=값의 타입 [{1}]이(가) 필터 [{2}]와(과) 부합하지 않기 때문에, [{0}](이)라는 이름의 세션 속성을 건너뛰었습니다.
|
||||
managerBase.sessionNotFound=세션 [{0}]을(를) 찾을 수 없었습니다.
|
||||
managerBase.sessionTimeout=유효하지 않은, 세션 제한 시간 초과 설정입니다: [{0}]
|
||||
managerBase.setContextNotNew=만일 매니저가 NEW 상태에 있지 않다면, 매니저와 연관된 컨텍스트를 변경하기 위해 setContext()를 호출하는 것은 불허됩니다.
|
||||
|
||||
persistentManager.backupMaxIdle=세션 [{0}]을(를) 세션 저장소에 백업합니다. [{1}]초 동안 유휴 상태였습니다.
|
||||
persistentManager.deserializeError=세션 [{0}]을(를) 역직렬화하는 중 오류 발생
|
||||
persistentManager.loading=[{0}]개의 저장된 세션들을 로드합니다.
|
||||
persistentManager.serializeError=세션을 직렬화하는 중 오류 발생 [{0}]: [{1}]
|
||||
persistentManager.storeKeysException=세션 저장소에 있는 세션들의 ID 목록을 결정할 수 없습니다. 아마도 세션 저장소가 비어 있는 것 같습니다.
|
||||
persistentManager.storeSizeException=세션 저장소에 얼마나 많은 세션이 존재하는지 알아낼 수 없습니다. 아마도 세션 저장소가 비어 있는 것 같습니다.
|
||||
persistentManager.swapIn=저장소로부터 세션 [{0}]을(를) 다시 로드하여 활성화시킵니다.
|
||||
persistentManager.swapInException=저장소에 저장된 세션을 메모리로 로드하는 중, 저장소에서 예외 발생: [{0}]
|
||||
persistentManager.swapInInvalid=세션 저장소로부터 로드된 세션 [{0}]은(는) 유효하지 않습니다.
|
||||
persistentManager.swapMaxIdle=[{1}]초 동안 유휴 상태에 있던, 세션 [{0}]을(를) 저장소로 옮깁니다.
|
||||
persistentManager.swapTooManyActive=[{1}]초 동안 비활성화 상태에 있던 세션 [{0}]을(를) 매니저로부터 저장소로 이동합니다. 너무 많은 세션들이 활성화되어 있습니다.
|
||||
persistentManager.tooManyActive=활성화된 세션들이 너무 많습니다: [{0}]. 세션 저장소로 내보낼 만한 유휴 세션들을 찾습니다.
|
||||
persistentManager.unloading=[{0}]개의 세션들을 저장합니다.
|
||||
|
||||
standardManager.deletePersistedFileFail=저장된 세션들을 읽은 후 [{0}]을(를) 삭제할 수 없습니다. 이 파일이 계속 존재한다면, 이후 세션을 저장하려는 시도들이 이로 인해 실패할 수 있습니다.
|
||||
standardManager.loading=[{0}](으)로부터 저장된 세션들을 로드합니다.
|
||||
standardManager.loading.exception=저장된 세션들을 로드하는 중 예외 발생
|
||||
standardManager.managerLoad=세션 저장소로부터 세션들을 로드하는 중 예외 발생
|
||||
standardManager.managerUnload=세션들을 저장소로 언로드하는 중 예외 발생
|
||||
standardManager.unloading=세션들을 [{0}]에 저장합니다.
|
||||
standardManager.unloading.debug=저장된 세션들을 언로드합니다.
|
||||
standardManager.unloading.nosessions=언로드할 수 있는 저장된 세션들이 없습니다.
|
||||
|
||||
standardSession.attributeEvent=세션 속성 이벤트 리스너가 예외를 발생시켰습니다.
|
||||
standardSession.bindingEvent=세션 바인딩 이벤트 리스너가 예외를 발생시켰습니다.
|
||||
standardSession.getAttribute.ise=getAttribute: 세션이 이미 무효화되었습니다.
|
||||
standardSession.getAttributeNames.ise=getAttributeNames: 세션이 이미 무효화되었습니다.
|
||||
standardSession.getCreationTime.ise=getCreationTime: 세션이 이미 무효화되었습니다.
|
||||
standardSession.getIdleTime.ise=getIdleTime: 세션이 이미 무효화 되었습니다.
|
||||
standardSession.getLastAccessedTime.ise=getLastAccessedTime: 세션이 이미 무효화 되었습니다.
|
||||
standardSession.getThisAccessedTime.ise=getThisAccessedTime: 세션이 이미 만료되었습니다.
|
||||
standardSession.getValueNames.ise=getValueNames: 세션이 이미 무효화 되었습니다.
|
||||
standardSession.invalidate.ise=invalidate: 세션이 이미 무효화되었습니다.
|
||||
standardSession.isNew.ise=isNew: 세션이 이미 무효화 되었습니다.
|
||||
standardSession.logoutfail=세션을 만료시킬 때, 사용자를 로그아웃 하는 중 예외 발생
|
||||
standardSession.notDeserializable=세션 [{1}]을(를) 위한 세션 속성 [{0}]을(를) 역직렬화할 수 없습니다.
|
||||
standardSession.notSerializable=세션 [{1}]을(를) 위한 세션 속성 [{0}]을(를) 직렬화할 수 없습니다.
|
||||
standardSession.removeAttribute.ise=removeAttribute: 세션이 이미 무효화되었습니다.
|
||||
standardSession.sessionEvent=세션 이벤트 리스너가 예외를 발생시켰습니다.
|
||||
standardSession.setAttribute.iae=setAttribute: 직렬화할 수 없는 속성 [{0}]
|
||||
standardSession.setAttribute.ise=setAttribute: 세션 [{0}]이(가) 이미 무효화되었습니다.
|
||||
standardSession.setAttribute.namenull=setAttribute: name 파라미터는 널일 수 없습니다.
|
||||
@@ -0,0 +1,58 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
JDBCStore.checkConnectionClassNotFoundException=找不到 JDBC 驱动程序类 [{0}]
|
||||
JDBCStore.checkConnectionDBClosed=数据库连接为空或已关闭。正在尝试重新连接。
|
||||
JDBCStore.checkConnectionDBReOpenFail=重新打开数据库失败,数据库可能已经宕机。
|
||||
JDBCStore.checkConnectionSQLException=发生 SQL 异常 [{0}]
|
||||
JDBCStore.loading=正在从数据库[{1}]加载会话[{0}]
|
||||
JDBCStore.missingDataSourceName=没有给出有效的 JNDI 名称。
|
||||
JDBCStore.saving=保存Session [{0}] 到数据库 [{1}]
|
||||
JDBCStore.wrongDataSource=无法打开 JNDI 数据源 [{0}]
|
||||
|
||||
fileStore.deleteFailed=无法删除阻止创建会话存储位置的文件 [{0}]
|
||||
fileStore.deleteSessionFailed=无法删除不再需要的文件[{0}]
|
||||
|
||||
managerBase.contextNull=使用 Manager 之前,必须将 Context 设置为非 null 值
|
||||
managerBase.createSession.ise=createSession:活跃session过多
|
||||
managerBase.sessionNotFound=找不到会话 [{0}]
|
||||
managerBase.setContextNotNew=如果Manager未处于NEW状态,则调用setContext()以更改与Manager关联的Context是非法的
|
||||
|
||||
persistentManager.deserializeError=错误反序列化会话[{0}]: [{1}]
|
||||
persistentManager.storeKeysException=不能从 session存储中获取session ID 的列表,假设存储为空
|
||||
persistentManager.storeSizeException=无法确定 session 存储区的会话数,假定存储区为空
|
||||
persistentManager.swapIn=在表单存储中,交换会话[{0}]
|
||||
persistentManager.swapMaxIdle=交换会话[{0}]以存储,空闲为[{1}]秒
|
||||
persistentManager.swapTooManyActive=太多活跃会话,替换闲置 [{1}] 秒的会话 [{0}]
|
||||
|
||||
standardManager.deletePersistedFileFail=读取持久会话后无法删除[{0}]。 此文件的持续存在可能导致将来尝试持续会话失败。
|
||||
standardManager.loading.exception=加载持久化会话时发生异常
|
||||
standardManager.managerLoad=从持久化存储加载会话发生异常
|
||||
standardManager.managerUnload=卸载会话到持久存储的异常
|
||||
standardManager.unloading.nosessions=没有要卸载的持久会话
|
||||
|
||||
standardSession.attributeEvent=会话属性事件侦听器引发异常
|
||||
standardSession.getAttribute.ise=getAttribute: 会话已失效
|
||||
standardSession.getAttributeNames.ise=getAttributeNames:会话已失效
|
||||
standardSession.getCreationTime.ise=getCreataionTime:会话已经无效
|
||||
standardSession.getIdleTime.ise=getIdleTime: 已失效的会话
|
||||
standardSession.getLastAccessedTime.ise=getLastAccessedTime: 会话已失效
|
||||
standardSession.getThisAccessedTime.ise=getThisAccessedTime:会话已经失效
|
||||
standardSession.getValueNames.ise=getValueNames:会话已经失效
|
||||
standardSession.logoutfail=当回话将过期登出用户异常
|
||||
standardSession.notDeserializable=无法反序列化会话 [{1}] 的属性 [{0}]
|
||||
standardSession.notSerializable=不能序列化会话[{1}]的属性[{0}]
|
||||
standardSession.removeAttribute.ise=删除属性:会话已失效
|
||||
standardSession.sessionEvent=会话时间监听抛出异常
|
||||
1286
java/org/apache/catalina/session/ManagerBase.java
Normal file
1286
java/org/apache/catalina/session/ManagerBase.java
Normal file
File diff suppressed because it is too large
Load Diff
51
java/org/apache/catalina/session/PersistentManager.java
Normal file
51
java/org/apache/catalina/session/PersistentManager.java
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.catalina.session;
|
||||
|
||||
/**
|
||||
* Implementation of the <b>Manager</b> interface that makes use of
|
||||
* a Store to swap active Sessions to disk. It can be configured to
|
||||
* achieve several different goals:
|
||||
*
|
||||
* <ul>
|
||||
* <li>Persist sessions across restarts of the Container</li>
|
||||
* <li>Fault tolerance, keep sessions backed up on disk to allow
|
||||
* recovery in the event of unplanned restarts.</li>
|
||||
* <li>Limit the number of active sessions kept in memory by
|
||||
* swapping less active sessions out to disk.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Kief Morris (kief@kief.com)
|
||||
*/
|
||||
public final class PersistentManager extends PersistentManagerBase {
|
||||
|
||||
// ----------------------------------------------------- Instance Variables
|
||||
|
||||
/**
|
||||
* The descriptive name of this Manager implementation (for logging).
|
||||
*/
|
||||
private static final String name = "PersistentManager";
|
||||
|
||||
|
||||
// ------------------------------------------------------------- Properties
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
1059
java/org/apache/catalina/session/PersistentManagerBase.java
Normal file
1059
java/org/apache/catalina/session/PersistentManagerBase.java
Normal file
File diff suppressed because it is too large
Load Diff
432
java/org/apache/catalina/session/StandardManager.java
Normal file
432
java/org/apache/catalina/session/StandardManager.java
Normal file
@@ -0,0 +1,432 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.catalina.session;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.apache.catalina.Context;
|
||||
import org.apache.catalina.LifecycleException;
|
||||
import org.apache.catalina.LifecycleState;
|
||||
import org.apache.catalina.Loader;
|
||||
import org.apache.catalina.Session;
|
||||
import org.apache.catalina.security.SecurityUtil;
|
||||
import org.apache.catalina.util.CustomObjectInputStream;
|
||||
import org.apache.juli.logging.Log;
|
||||
import org.apache.juli.logging.LogFactory;
|
||||
import org.apache.tomcat.util.ExceptionUtils;
|
||||
|
||||
/**
|
||||
* Standard implementation of the <b>Manager</b> interface that provides
|
||||
* simple session persistence across restarts of this component (such as
|
||||
* when the entire server is shut down and restarted, or when a particular
|
||||
* web application is reloaded.
|
||||
* <p>
|
||||
* <b>IMPLEMENTATION NOTE</b>: Correct behavior of session storing and
|
||||
* reloading depends upon external calls to the <code>start()</code> and
|
||||
* <code>stop()</code> methods of this class at the correct times.
|
||||
*
|
||||
* @author Craig R. McClanahan
|
||||
*/
|
||||
public class StandardManager extends ManagerBase {
|
||||
|
||||
private final Log log = LogFactory.getLog(StandardManager.class); // must not be static
|
||||
|
||||
// ---------------------------------------------------- Security Classes
|
||||
|
||||
private class PrivilegedDoLoad
|
||||
implements PrivilegedExceptionAction<Void> {
|
||||
|
||||
PrivilegedDoLoad() {
|
||||
// NOOP
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void run() throws Exception{
|
||||
doLoad();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private class PrivilegedDoUnload
|
||||
implements PrivilegedExceptionAction<Void> {
|
||||
|
||||
PrivilegedDoUnload() {
|
||||
// NOOP
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void run() throws Exception{
|
||||
doUnload();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------- Instance Variables
|
||||
|
||||
/**
|
||||
* The descriptive name of this Manager implementation (for logging).
|
||||
*/
|
||||
protected static final String name = "StandardManager";
|
||||
|
||||
|
||||
/**
|
||||
* Path name of the disk file in which active sessions are saved
|
||||
* when we stop, and from which these sessions are loaded when we start.
|
||||
* A <code>null</code> value indicates that no persistence is desired.
|
||||
* If this pathname is relative, it will be resolved against the
|
||||
* temporary working directory provided by our context, available via
|
||||
* the <code>javax.servlet.context.tempdir</code> context attribute.
|
||||
*/
|
||||
protected String pathname = "SESSIONS.ser";
|
||||
|
||||
|
||||
// ------------------------------------------------------------- Properties
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return The session persistence pathname, if any.
|
||||
*/
|
||||
public String getPathname() {
|
||||
return pathname;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the session persistence pathname to the specified value. If no
|
||||
* persistence support is desired, set the pathname to <code>null</code>.
|
||||
*
|
||||
* @param pathname New session persistence pathname
|
||||
*/
|
||||
public void setPathname(String pathname) {
|
||||
String oldPathname = this.pathname;
|
||||
this.pathname = pathname;
|
||||
support.firePropertyChange("pathname", oldPathname, this.pathname);
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------- Public Methods
|
||||
|
||||
@Override
|
||||
public void load() throws ClassNotFoundException, IOException {
|
||||
if (SecurityUtil.isPackageProtectionEnabled()){
|
||||
try{
|
||||
AccessController.doPrivileged( new PrivilegedDoLoad() );
|
||||
} catch (PrivilegedActionException ex){
|
||||
Exception exception = ex.getException();
|
||||
if (exception instanceof ClassNotFoundException) {
|
||||
throw (ClassNotFoundException)exception;
|
||||
} else if (exception instanceof IOException) {
|
||||
throw (IOException)exception;
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Unreported exception in load() ", exception);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
doLoad();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load any currently active sessions that were previously unloaded
|
||||
* to the appropriate persistence mechanism, if any. If persistence is not
|
||||
* supported, this method returns without doing anything.
|
||||
*
|
||||
* @exception ClassNotFoundException if a serialized class cannot be
|
||||
* found during the reload
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
protected void doLoad() throws ClassNotFoundException, IOException {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Start: Loading persisted sessions");
|
||||
}
|
||||
|
||||
// Initialize our internal data structures
|
||||
sessions.clear();
|
||||
|
||||
// Open an input stream to the specified pathname, if any
|
||||
File file = file();
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug(sm.getString("standardManager.loading", pathname));
|
||||
}
|
||||
Loader loader = null;
|
||||
ClassLoader classLoader = null;
|
||||
Log logger = null;
|
||||
try (FileInputStream fis = new FileInputStream(file.getAbsolutePath());
|
||||
BufferedInputStream bis = new BufferedInputStream(fis)) {
|
||||
Context c = getContext();
|
||||
loader = c.getLoader();
|
||||
logger = c.getLogger();
|
||||
if (loader != null) {
|
||||
classLoader = loader.getClassLoader();
|
||||
}
|
||||
if (classLoader == null) {
|
||||
classLoader = getClass().getClassLoader();
|
||||
}
|
||||
|
||||
// Load the previously unloaded active sessions
|
||||
synchronized (sessions) {
|
||||
try (ObjectInputStream ois = new CustomObjectInputStream(bis, classLoader, logger,
|
||||
getSessionAttributeValueClassNamePattern(),
|
||||
getWarnOnSessionAttributeFilterFailure())) {
|
||||
Integer count = (Integer) ois.readObject();
|
||||
int n = count.intValue();
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Loading " + n + " persisted sessions");
|
||||
for (int i = 0; i < n; i++) {
|
||||
StandardSession session = getNewSession();
|
||||
session.readObjectData(ois);
|
||||
session.setManager(this);
|
||||
sessions.put(session.getIdInternal(), session);
|
||||
session.activate();
|
||||
if (!session.isValidInternal()) {
|
||||
// If session is already invalid,
|
||||
// expire session to prevent memory leak.
|
||||
session.setValid(true);
|
||||
session.expire();
|
||||
}
|
||||
sessionCounter++;
|
||||
}
|
||||
} finally {
|
||||
// Delete the persistent storage file
|
||||
if (file.exists()) {
|
||||
if (!file.delete()) {
|
||||
log.warn(sm.getString("standardManager.deletePersistedFileFail", file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("No persisted data file found");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Finish: Loading persisted sessions");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void unload() throws IOException {
|
||||
if (SecurityUtil.isPackageProtectionEnabled()) {
|
||||
try {
|
||||
AccessController.doPrivileged(new PrivilegedDoUnload());
|
||||
} catch (PrivilegedActionException ex){
|
||||
Exception exception = ex.getException();
|
||||
if (exception instanceof IOException) {
|
||||
throw (IOException)exception;
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Unreported exception in unLoad()", exception);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
doUnload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save any currently active sessions in the appropriate persistence
|
||||
* mechanism, if any. If persistence is not supported, this method
|
||||
* returns without doing anything.
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
*/
|
||||
protected void doUnload() throws IOException {
|
||||
|
||||
if (log.isDebugEnabled())
|
||||
log.debug(sm.getString("standardManager.unloading.debug"));
|
||||
|
||||
if (sessions.isEmpty()) {
|
||||
log.debug(sm.getString("standardManager.unloading.nosessions"));
|
||||
return; // nothing to do
|
||||
}
|
||||
|
||||
// Open an output stream to the specified pathname, if any
|
||||
File file = file();
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug(sm.getString("standardManager.unloading", pathname));
|
||||
}
|
||||
|
||||
// Keep a note of sessions that are expired
|
||||
List<StandardSession> list = new ArrayList<>();
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(file.getAbsolutePath());
|
||||
BufferedOutputStream bos = new BufferedOutputStream(fos);
|
||||
ObjectOutputStream oos = new ObjectOutputStream(bos)) {
|
||||
|
||||
synchronized (sessions) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Unloading " + sessions.size() + " sessions");
|
||||
}
|
||||
// Write the number of active sessions, followed by the details
|
||||
oos.writeObject(Integer.valueOf(sessions.size()));
|
||||
for (Session s : sessions.values()) {
|
||||
StandardSession session = (StandardSession) s;
|
||||
list.add(session);
|
||||
session.passivate();
|
||||
session.writeObjectData(oos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Expire all the sessions we just wrote
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Expiring " + list.size() + " persisted sessions");
|
||||
}
|
||||
for (StandardSession session : list) {
|
||||
try {
|
||||
session.expire(false);
|
||||
} catch (Throwable t) {
|
||||
ExceptionUtils.handleThrowable(t);
|
||||
} finally {
|
||||
session.recycle();
|
||||
}
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Unloading complete");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Start this component and implement the requirements
|
||||
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
|
||||
*
|
||||
* @exception LifecycleException if this component detects a fatal error
|
||||
* that prevents this component from being used
|
||||
*/
|
||||
@Override
|
||||
protected synchronized void startInternal() throws LifecycleException {
|
||||
|
||||
super.startInternal();
|
||||
|
||||
// Load unloaded sessions, if any
|
||||
try {
|
||||
load();
|
||||
} catch (Throwable t) {
|
||||
ExceptionUtils.handleThrowable(t);
|
||||
log.error(sm.getString("standardManager.managerLoad"), t);
|
||||
}
|
||||
|
||||
setState(LifecycleState.STARTING);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stop this component and implement the requirements
|
||||
* of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
|
||||
*
|
||||
* @exception LifecycleException if this component detects a fatal error
|
||||
* that prevents this component from being used
|
||||
*/
|
||||
@Override
|
||||
protected synchronized void stopInternal() throws LifecycleException {
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Stopping");
|
||||
}
|
||||
|
||||
setState(LifecycleState.STOPPING);
|
||||
|
||||
// Write out sessions
|
||||
try {
|
||||
unload();
|
||||
} catch (Throwable t) {
|
||||
ExceptionUtils.handleThrowable(t);
|
||||
log.error(sm.getString("standardManager.managerUnload"), t);
|
||||
}
|
||||
|
||||
// Expire all active sessions
|
||||
Session sessions[] = findSessions();
|
||||
for (int i = 0; i < sessions.length; i++) {
|
||||
Session session = sessions[i];
|
||||
try {
|
||||
if (session.isValid()) {
|
||||
session.expire();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
ExceptionUtils.handleThrowable(t);
|
||||
} finally {
|
||||
// Measure against memory leaking if references to the session
|
||||
// object are kept in a shared field somewhere
|
||||
session.recycle();
|
||||
}
|
||||
}
|
||||
|
||||
// Require a new random number generator if we are restarted
|
||||
super.stopInternal();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------ Protected Methods
|
||||
|
||||
/**
|
||||
* Return a File object representing the pathname to our
|
||||
* persistence file, if any.
|
||||
* @return the file
|
||||
*/
|
||||
protected File file() {
|
||||
if (pathname == null || pathname.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
File file = new File(pathname);
|
||||
if (!file.isAbsolute()) {
|
||||
Context context = getContext();
|
||||
ServletContext servletContext = context.getServletContext();
|
||||
File tempdir = (File) servletContext.getAttribute(ServletContext.TEMPDIR);
|
||||
if (tempdir != null) {
|
||||
file = new File(tempdir, pathname);
|
||||
}
|
||||
}
|
||||
return file;
|
||||
}
|
||||
}
|
||||
1883
java/org/apache/catalina/session/StandardSession.java
Normal file
1883
java/org/apache/catalina/session/StandardSession.java
Normal file
File diff suppressed because it is too large
Load Diff
179
java/org/apache/catalina/session/StandardSessionFacade.java
Normal file
179
java/org/apache/catalina/session/StandardSessionFacade.java
Normal file
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.catalina.session;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
/**
|
||||
* Facade for the StandardSession object.
|
||||
*
|
||||
* @author Remy Maucherat
|
||||
*/
|
||||
public class StandardSessionFacade implements HttpSession {
|
||||
|
||||
// ----------------------------------------------------------- Constructors
|
||||
|
||||
/**
|
||||
* Construct a new session facade.
|
||||
*
|
||||
* @param session The session instance to wrap
|
||||
*/
|
||||
public StandardSessionFacade(HttpSession session) {
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------- Instance Variables
|
||||
|
||||
/**
|
||||
* Wrapped session object.
|
||||
*/
|
||||
private final HttpSession session;
|
||||
|
||||
|
||||
// ---------------------------------------------------- HttpSession Methods
|
||||
|
||||
@Override
|
||||
public long getCreationTime() {
|
||||
return session.getCreationTime();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return session.getId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long getLastAccessedTime() {
|
||||
return session.getLastAccessedTime();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ServletContext getServletContext() {
|
||||
// FIXME : Facade this object ?
|
||||
return session.getServletContext();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setMaxInactiveInterval(int interval) {
|
||||
session.setMaxInactiveInterval(interval);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxInactiveInterval() {
|
||||
return session.getMaxInactiveInterval();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated As of Version 2.1, this method is deprecated and has no
|
||||
* replacement.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public javax.servlet.http.HttpSessionContext getSessionContext() {
|
||||
return session.getSessionContext();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getAttribute(String name) {
|
||||
return session.getAttribute(name);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated As of Version 2.2, this method is replaced by
|
||||
* {@link #getAttribute}.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public Object getValue(String name) {
|
||||
return session.getAttribute(name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Enumeration<String> getAttributeNames() {
|
||||
return session.getAttributeNames();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated As of Version 2.2, this method is replaced by
|
||||
* {@link #getAttributeNames}
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getValueNames() {
|
||||
return session.getValueNames();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setAttribute(String name, Object value) {
|
||||
session.setAttribute(name, value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated As of Version 2.2, this method is replaced by
|
||||
* {@link #setAttribute}
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void putValue(String name, Object value) {
|
||||
session.setAttribute(name, value);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void removeAttribute(String name) {
|
||||
session.removeAttribute(name);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated As of Version 2.2, this method is replaced by
|
||||
* {@link #removeAttribute}
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void removeValue(String name) {
|
||||
session.removeAttribute(name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
session.invalidate();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isNew() {
|
||||
return session.isNew();
|
||||
}
|
||||
}
|
||||
290
java/org/apache/catalina/session/StoreBase.java
Normal file
290
java/org/apache/catalina/session/StoreBase.java
Normal file
@@ -0,0 +1,290 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.catalina.session;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
|
||||
import org.apache.catalina.LifecycleException;
|
||||
import org.apache.catalina.LifecycleState;
|
||||
import org.apache.catalina.Manager;
|
||||
import org.apache.catalina.Store;
|
||||
import org.apache.catalina.util.CustomObjectInputStream;
|
||||
import org.apache.catalina.util.LifecycleBase;
|
||||
import org.apache.tomcat.util.res.StringManager;
|
||||
|
||||
/**
|
||||
* Abstract implementation of the {@link Store} interface to
|
||||
* support most of the functionality required by a {@link Store}.
|
||||
*
|
||||
* @author Bip Thelin
|
||||
*/
|
||||
public abstract class StoreBase extends LifecycleBase implements Store {
|
||||
|
||||
// ----------------------------------------------------- Instance Variables
|
||||
|
||||
/**
|
||||
* Name to register for this Store, used for logging.
|
||||
*/
|
||||
protected static final String storeName = "StoreBase";
|
||||
|
||||
/**
|
||||
* The property change support for this component.
|
||||
*/
|
||||
protected final PropertyChangeSupport support = new PropertyChangeSupport(this);
|
||||
|
||||
/**
|
||||
* The string manager for this package.
|
||||
*/
|
||||
protected static final StringManager sm = StringManager.getManager(StoreBase.class);
|
||||
|
||||
/**
|
||||
* The Manager with which this Store is associated.
|
||||
*/
|
||||
protected Manager manager;
|
||||
|
||||
|
||||
// ------------------------------------------------------------- Properties
|
||||
|
||||
/**
|
||||
* @return the name for this Store, used for logging.
|
||||
*/
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the Manager with which this Store is associated.
|
||||
*
|
||||
* @param manager The newly associated Manager
|
||||
*/
|
||||
@Override
|
||||
public void setManager(Manager manager) {
|
||||
Manager oldManager = this.manager;
|
||||
this.manager = manager;
|
||||
support.firePropertyChange("manager", oldManager, this.manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Manager with which the Store is associated.
|
||||
*/
|
||||
@Override
|
||||
public Manager getManager() {
|
||||
return this.manager;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------- Public Methods
|
||||
|
||||
/**
|
||||
* Add a property change listener to this component.
|
||||
*
|
||||
* @param listener a value of type {@link PropertyChangeListener}
|
||||
*/
|
||||
@Override
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
support.addPropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a property change listener from this component.
|
||||
*
|
||||
* @param listener The listener to remove
|
||||
*/
|
||||
@Override
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
support.removePropertyChangeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get only those keys of sessions, that are saved in the Store and are to
|
||||
* be expired.
|
||||
*
|
||||
* @return list of session keys, that are to be expired
|
||||
* @throws IOException
|
||||
* if an input-/output error occurred
|
||||
*/
|
||||
public String[] expiredKeys() throws IOException {
|
||||
return keys();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by our background reaper thread to check if Sessions
|
||||
* saved in our store are subject of being expired. If so expire
|
||||
* the Session and remove it from the Store.
|
||||
*
|
||||
*/
|
||||
public void processExpires() {
|
||||
String[] keys = null;
|
||||
|
||||
if(!getState().isAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
keys = expiredKeys();
|
||||
} catch (IOException e) {
|
||||
manager.getContext().getLogger().error("Error getting keys", e);
|
||||
return;
|
||||
}
|
||||
if (manager.getContext().getLogger().isDebugEnabled()) {
|
||||
manager.getContext().getLogger().debug(getStoreName()+ ": processExpires check number of " + keys.length + " sessions" );
|
||||
}
|
||||
|
||||
long timeNow = System.currentTimeMillis();
|
||||
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
try {
|
||||
StandardSession session = (StandardSession) load(keys[i]);
|
||||
if (session == null) {
|
||||
continue;
|
||||
}
|
||||
int timeIdle = (int) ((timeNow - session.getThisAccessedTime()) / 1000L);
|
||||
if (timeIdle < session.getMaxInactiveInterval()) {
|
||||
continue;
|
||||
}
|
||||
if (manager.getContext().getLogger().isDebugEnabled()) {
|
||||
manager.getContext().getLogger().debug(getStoreName()+ ": processExpires expire store session " + keys[i] );
|
||||
}
|
||||
boolean isLoaded = false;
|
||||
if (manager instanceof PersistentManagerBase) {
|
||||
isLoaded = ((PersistentManagerBase) manager).isLoaded(keys[i]);
|
||||
} else {
|
||||
try {
|
||||
if (manager.findSession(keys[i]) != null) {
|
||||
isLoaded = true;
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
// Ignore - session will be expired
|
||||
}
|
||||
}
|
||||
if (isLoaded) {
|
||||
// recycle old backup session
|
||||
session.recycle();
|
||||
} else {
|
||||
// expire swapped out session
|
||||
session.expire();
|
||||
}
|
||||
remove(keys[i]);
|
||||
} catch (Exception e) {
|
||||
manager.getContext().getLogger().error("Session: "+keys[i]+"; ", e);
|
||||
try {
|
||||
remove(keys[i]);
|
||||
} catch (IOException e2) {
|
||||
manager.getContext().getLogger().error("Error removing key", e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------- Protected Methods
|
||||
|
||||
/**
|
||||
* Create the object input stream to use to read a session from the store.
|
||||
* Sub-classes <b>must</b> have set the thread context class loader before
|
||||
* calling this method.
|
||||
*
|
||||
* @param is The input stream provided by the sub-class that will provide
|
||||
* the data for a session
|
||||
*
|
||||
* @return An appropriately configured ObjectInputStream from which the
|
||||
* session can be read.
|
||||
*
|
||||
* @throws IOException if a problem occurs creating the ObjectInputStream
|
||||
*/
|
||||
protected ObjectInputStream getObjectInputStream(InputStream is) throws IOException {
|
||||
BufferedInputStream bis = new BufferedInputStream(is);
|
||||
|
||||
CustomObjectInputStream ois;
|
||||
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
||||
|
||||
if (manager instanceof ManagerBase) {
|
||||
ManagerBase managerBase = (ManagerBase) manager;
|
||||
ois = new CustomObjectInputStream(bis, classLoader, manager.getContext().getLogger(),
|
||||
managerBase.getSessionAttributeValueClassNamePattern(),
|
||||
managerBase.getWarnOnSessionAttributeFilterFailure());
|
||||
} else {
|
||||
ois = new CustomObjectInputStream(bis, classLoader);
|
||||
}
|
||||
|
||||
return ois;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initInternal() {
|
||||
// NOOP
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Start this component and implement the requirements
|
||||
* of {@link LifecycleBase#startInternal()}.
|
||||
*
|
||||
* @exception LifecycleException if this component detects a fatal error
|
||||
* that prevents this component from being used
|
||||
*/
|
||||
@Override
|
||||
protected synchronized void startInternal() throws LifecycleException {
|
||||
|
||||
setState(LifecycleState.STARTING);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stop this component and implement the requirements
|
||||
* of {@link LifecycleBase#stopInternal()}.
|
||||
*
|
||||
* @exception LifecycleException if this component detects a fatal error
|
||||
* that prevents this component from being used
|
||||
*/
|
||||
@Override
|
||||
protected synchronized void stopInternal() throws LifecycleException {
|
||||
|
||||
setState(LifecycleState.STOPPING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void destroyInternal() {
|
||||
// NOOP
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return a String rendering of this object.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder(this.getClass().getName());
|
||||
sb.append('[');
|
||||
if (manager == null) {
|
||||
sb.append("Manager is null");
|
||||
} else {
|
||||
sb.append(manager);
|
||||
}
|
||||
sb.append(']');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.catalina.session;
|
||||
|
||||
/**
|
||||
* An exception that indicates the maximum number of active sessions has been
|
||||
* reached and the server is refusing to create any new sessions.
|
||||
*/
|
||||
public class TooManyActiveSessionsException extends IllegalStateException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The maximum number of active sessions the server will tolerate.
|
||||
*/
|
||||
private final int maxActiveSessions;
|
||||
|
||||
/**
|
||||
* Creates a new TooManyActiveSessionsException.
|
||||
*
|
||||
* @param message A description for the exception.
|
||||
* @param maxActive The maximum number of active sessions allowed by the
|
||||
* session manager.
|
||||
*/
|
||||
public TooManyActiveSessionsException(String message, int maxActive) {
|
||||
super(message);
|
||||
maxActiveSessions = maxActive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the maximum number of sessions allowed by the session manager.
|
||||
*
|
||||
* @return The maximum number of sessions allowed by the session manager.
|
||||
*/
|
||||
public int getMaxActiveSessions() {
|
||||
return maxActiveSessions;
|
||||
}
|
||||
}
|
||||
400
java/org/apache/catalina/session/mbeans-descriptors.xml
Normal file
400
java/org/apache/catalina/session/mbeans-descriptors.xml
Normal file
@@ -0,0 +1,400 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<mbeans-descriptors>
|
||||
|
||||
<mbean name="StandardManager"
|
||||
description="Standard implementation of the Manager interface"
|
||||
domain="Catalina"
|
||||
group="Manager"
|
||||
type="org.apache.catalina.session.StandardManager">
|
||||
|
||||
<attribute name="activeSessions"
|
||||
description="Number of active sessions at this moment"
|
||||
type="int"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="className"
|
||||
description="Fully qualified class name of the managed object"
|
||||
type="java.lang.String"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="duplicates"
|
||||
description="Number of duplicated session ids generated"
|
||||
type="int" />
|
||||
|
||||
<attribute name="expiredSessions"
|
||||
description="Number of sessions that expired ( doesn't include explicit invalidations )"
|
||||
type="long" />
|
||||
|
||||
<attribute name="jvmRoute"
|
||||
description="Retrieve the JvmRoute for the enclosing Engine"
|
||||
type="java.lang.String"
|
||||
writeable = "false" />
|
||||
|
||||
<attribute name="maxActive"
|
||||
description="Maximum number of active sessions so far"
|
||||
type="int" />
|
||||
|
||||
<attribute name="maxActiveSessions"
|
||||
description="The maximum number of active Sessions allowed, or -1
|
||||
for no limit"
|
||||
type="int"/>
|
||||
|
||||
<attribute name="name"
|
||||
description="The descriptive name of this Manager implementation
|
||||
(for logging)"
|
||||
type="java.lang.String"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="pathname"
|
||||
description="Path name of the disk file in which active sessions"
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="processExpiresFrequency"
|
||||
description="The frequency of the manager checks (expiration and passivation)"
|
||||
type="int"/>
|
||||
|
||||
<attribute name="processingTime"
|
||||
description="Time spent doing housekeeping and expiration"
|
||||
type="long" />
|
||||
|
||||
<attribute name="secureRandomAlgorithm"
|
||||
description="The secure random number generator algorithm name"
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="secureRandomClass"
|
||||
description="The secure random number generator class name"
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="secureRandomProvider"
|
||||
description="The secure random number generator provider name"
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="sessionAverageAliveTime"
|
||||
description="Average time an expired session had been alive"
|
||||
type="int"
|
||||
writeable="false" />
|
||||
|
||||
<attribute name="sessionCreateRate"
|
||||
description="Session creation rate in sessions per minute"
|
||||
type="int"
|
||||
writeable="false" />
|
||||
|
||||
<attribute name="sessionCounter"
|
||||
description="Total number of sessions created by this manager"
|
||||
type="long" />
|
||||
|
||||
<attribute name="sessionExpireRate"
|
||||
description="Session expiration rate in sessions per minute"
|
||||
type="int"
|
||||
writeable="false" />
|
||||
|
||||
<attribute name="sessionMaxAliveTime"
|
||||
description="Longest time an expired session had been alive"
|
||||
type="int" />
|
||||
|
||||
<attribute name="stateName"
|
||||
description="The name of the LifecycleState that this component is currently in"
|
||||
type="java.lang.String"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="rejectedSessions"
|
||||
description="Number of sessions we rejected due to maxActive being reached"
|
||||
type="int"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="sessionAttributeNameFilter"
|
||||
description="The string pattern used for including session attributes in distribution. Null means all attributes are included."
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="sessionAttributeValueClassNameFilter"
|
||||
description="The regular expression used to filter session attributes based on the implementation class of the value. The regular expression is anchored and must match the fully qualified class name."
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="warnOnSessionAttributeFilterFailure"
|
||||
description="Should a WARN level log message be generated if a session attribute fails to match sessionAttributeNameFilter or sessionAttributeClassNameFilter?"
|
||||
type="boolean"/>
|
||||
|
||||
<operation name="backgroundProcess"
|
||||
description="Invalidate all sessions that have expired."
|
||||
impact="ACTION"
|
||||
returnType="void">
|
||||
</operation>
|
||||
|
||||
<operation name="expireSession"
|
||||
description="Expire a session"
|
||||
impact="ACTION"
|
||||
returnType="void">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getCreationTime"
|
||||
description="Get the creation time"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getCreationTimestamp"
|
||||
description="Get the creation timestamp"
|
||||
impact="ACTION"
|
||||
returnType="long">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getLastAccessedTime"
|
||||
description="Get the last access time"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getLastAccessedTimestamp"
|
||||
description="Get the last access timestamp"
|
||||
impact="ACTION"
|
||||
returnType="long">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getSessionAttribute"
|
||||
description="Return a session attribute"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
<parameter name="key"
|
||||
description="key of the attribute"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="listSessionIds"
|
||||
description="Return the list of active session ids"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
</operation>
|
||||
|
||||
</mbean>
|
||||
|
||||
<mbean name="PersistentManager"
|
||||
description="Persistent Manager"
|
||||
domain="Catalina"
|
||||
group="Manager"
|
||||
type="org.apache.catalina.session.PersistentManager">
|
||||
|
||||
<attribute name="activeSessions"
|
||||
description="Number of active sessions at this moment"
|
||||
type="int"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="className"
|
||||
description="Fully qualified class name of the managed object"
|
||||
type="java.lang.String"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="duplicates"
|
||||
description="Number of duplicated session ids generated"
|
||||
type="int" />
|
||||
|
||||
<attribute name="expiredSessions"
|
||||
description="Number of sessions that expired ( doesn't include explicit invalidations )"
|
||||
type="long" />
|
||||
|
||||
<attribute name="jvmRoute"
|
||||
description="Retrieve the JvmRoute for the enclosing Engine"
|
||||
type="java.lang.String"
|
||||
writeable = "false" />
|
||||
|
||||
<attribute name="maxActive"
|
||||
description="Maximum number of active sessions so far"
|
||||
type="int" />
|
||||
|
||||
<attribute name="maxActiveSessions"
|
||||
description="The maximum number of active Sessions allowed, or -1
|
||||
for no limit"
|
||||
type="int"/>
|
||||
|
||||
<attribute name="maxIdleBackup"
|
||||
description="Indicates how many seconds old a session can get, after its last use in a request, before it should be backed up to the store. -1 means sessions are not backed up."
|
||||
type="int"/>
|
||||
|
||||
<attribute name="maxIdleSwap"
|
||||
description="Indicates how many seconds old a session can get, after its last use in a request, before it should be backed up to the store. -1 means sessions are not backed up."
|
||||
type="int"/>
|
||||
|
||||
<attribute name="minIdleSwap"
|
||||
description=" The minimum time in seconds that a session must be idle before it can be swapped out of memory, or -1 if it can be swapped out at any time."
|
||||
type="int"/>
|
||||
|
||||
<attribute name="name"
|
||||
description="The descriptive name of this Manager implementation (for logging)"
|
||||
type="java.lang.String"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="processExpiresFrequency"
|
||||
description="The frequency of the manager checks (expiration and passivation)"
|
||||
type="int"/>
|
||||
|
||||
<attribute name="processingTime"
|
||||
description="Time spent doing housekeeping and expiration"
|
||||
type="long" />
|
||||
|
||||
<attribute name="saveOnRestart"
|
||||
description="Indicates whether sessions are saved when the Manager is shut down properly. This requires the unload() method to be called."
|
||||
type="boolean" />
|
||||
|
||||
<attribute name="secureRandomClass"
|
||||
description="The random number generator class name"
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="sessionAverageAliveTime"
|
||||
description="Average time an expired session had been alive"
|
||||
type="int"
|
||||
writeable="false" />
|
||||
|
||||
<attribute name="sessionCreateRate"
|
||||
description="Session creation rate in sessions per minute"
|
||||
type="int"
|
||||
writeable="false" />
|
||||
|
||||
<attribute name="sessionCounter"
|
||||
description="Total number of sessions created by this manager"
|
||||
type="long" />
|
||||
|
||||
<attribute name="sessionExpireRate"
|
||||
description="Session expiration rate in sessions per minute"
|
||||
type="int"
|
||||
writeable="false" />
|
||||
|
||||
<attribute name="sessionMaxAliveTime"
|
||||
description="Longest time an expired session had been alive"
|
||||
type="int" />
|
||||
|
||||
<attribute name="stateName"
|
||||
description="The name of the LifecycleState that this component is currently in"
|
||||
type="java.lang.String"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="rejectedSessions"
|
||||
description="Number of sessions we rejected due to maxActive being reached"
|
||||
type="int"
|
||||
writeable="false"/>
|
||||
|
||||
<attribute name="sessionAttributeNameFilter"
|
||||
description="The string pattern used for including session attributes in distribution. Null means all attributes are included."
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="sessionAttributeValueClassNameFilter"
|
||||
description="The regular expression used to filter session attributes based on the implementation class of the value. The regular expression is anchored and must match the fully qualified class name."
|
||||
type="java.lang.String"/>
|
||||
|
||||
<attribute name="warnOnSessionAttributeFilterFailure"
|
||||
description="Should a WARN level log message be generated if a session attribute fails to match sessionAttributeNameFilter or sessionAttributeClassNameFilter?"
|
||||
type="boolean"/>
|
||||
|
||||
<operation name="backgroundProcess"
|
||||
description="Invalidate all sessions that have expired."
|
||||
impact="ACTION"
|
||||
returnType="void">
|
||||
</operation>
|
||||
|
||||
<operation name="expireSession"
|
||||
description="Expire a session"
|
||||
impact="ACTION"
|
||||
returnType="void">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getCreationTime"
|
||||
description="Get the creation time"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getCreationTimestamp"
|
||||
description="Get the creation timestamp"
|
||||
impact="ACTION"
|
||||
returnType="long">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getLastAccessedTime"
|
||||
description="Get the last access time"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getLastAccessedTimestamp"
|
||||
description="Get the last access timestamp"
|
||||
impact="ACTION"
|
||||
returnType="long">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getSessionAttribute"
|
||||
description="Return a session attribute"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
<parameter name="key"
|
||||
description="key of the attribute"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
<operation name="listSessionIds"
|
||||
description="Return the list of active session ids"
|
||||
impact="ACTION"
|
||||
returnType="java.lang.String">
|
||||
</operation>
|
||||
|
||||
<operation name="isLoaded"
|
||||
description="If the session id is loaded in memory?"
|
||||
impact="ACTION"
|
||||
returnType="boolean">
|
||||
<parameter name="sessionId"
|
||||
description="Id of the session"
|
||||
type="java.lang.String"/>
|
||||
</operation>
|
||||
|
||||
</mbean>
|
||||
|
||||
</mbeans-descriptors>
|
||||
63
java/org/apache/catalina/session/package.html
Normal file
63
java/org/apache/catalina/session/package.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<body>
|
||||
|
||||
<p>This package contains the standard <code>Manager</code> and
|
||||
<code>Session</code> implementations that represent the collection of
|
||||
active sessions and the individual sessions themselves, respectively,
|
||||
that are associated with a <code>Context</code>. Additional implementations
|
||||
of the <code>Manager</code> interface can be based upon the supplied
|
||||
convenience base class (<code>ManagerBase</code>), if desired. Different
|
||||
implementations of <code>Session</code> are possible, but a need for
|
||||
functionality beyond what is provided by the standard implementation
|
||||
(<code>StandardSession</code>) is not expected.</p>
|
||||
|
||||
<p>The convenience <code>ManagerBase</code> base class is configured by
|
||||
setting the following properties:</p>
|
||||
<ul>
|
||||
<li><b>algorithm</b> - Message digest algorithm to be used when
|
||||
generating session identifiers. This must be the name of an
|
||||
algorithm supported by the <code>java.security.MessageDigest</code>
|
||||
class on your platform. [DEFAULT_ALGORITHM]</li>
|
||||
<li><b>debug</b> - Debugging detail level for this component. [0]</li>
|
||||
<li><b>distributable</b> - Has the web application we are associated with
|
||||
been marked as "distributable"? If it has, attempts to add or replace
|
||||
a session attribute object that does not implement the
|
||||
<code>java.io.Serializable</code> interface will be rejected.
|
||||
[false]</li>
|
||||
<li><b>maxInactiveInterval</b> - The default maximum inactive interval,
|
||||
in minutes, for sessions created by this Manager. The standard
|
||||
implementation automatically updates this value based on the configuration
|
||||
settings in the web application deployment descriptor. [60]</li>
|
||||
<li><b>randomClass</b> - The Java class name of the random number generator
|
||||
to be used when creating session identifiers for this Manager.
|
||||
[java.security.SecureRandom]</li>
|
||||
</ul>
|
||||
|
||||
<p>The standard implementation of the <code>Manager</code> interface
|
||||
(<code>StandardManager</code>) supports the following additional configuration
|
||||
properties:</p>
|
||||
<ul>
|
||||
<li><b>maxActiveSessions</b> - The maximum number of active sessions that
|
||||
will be allowed, or -1 for no limit. [-1]</li>
|
||||
<li><b>pathname</b> - Pathname to the file that is used to store session
|
||||
data persistently across container restarts. If this pathname is relative,
|
||||
it is resolved against the temporary working directory provided by our
|
||||
associated Context, if any. ["sessions.ser"]</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
Reference in New Issue
Block a user