Author: markt Date: Sat Oct 22 21:13:48 2011 New Revision: 1187795 URL: http://svn.apache.org/viewvc?rev=1187795&view=rev Log: Whitespace removal from /java/org/apache/catalina/session
Modified: tomcat/trunk/java/org/apache/catalina/session/Constants.java tomcat/trunk/java/org/apache/catalina/session/FileStore.java tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java tomcat/trunk/java/org/apache/catalina/session/PersistentManager.java tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java tomcat/trunk/java/org/apache/catalina/session/StandardManager.java tomcat/trunk/java/org/apache/catalina/session/StandardSession.java tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java tomcat/trunk/java/org/apache/catalina/session/StoreBase.java tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml Modified: tomcat/trunk/java/org/apache/catalina/session/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/Constants.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/Constants.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/Constants.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. Modified: tomcat/trunk/java/org/apache/catalina/session/FileStore.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/FileStore.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/FileStore.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/FileStore.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -199,7 +199,7 @@ public final class FileStore extends Sto } String files[] = file.list(); - + // Bugzilla 32130 if((files == null) || (files.length < 1)) { return (new String[0]); Modified: tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -111,7 +111,7 @@ public class JDBCStore extends StoreBase * DataSource to use */ protected DataSource dataSource = null; - + // ------------------------------------------------------------- Table & cols /** @@ -598,7 +598,7 @@ public class JDBCStore extends StoreBase ObjectInputStream ois = null; BufferedInputStream bis = null; Container container = manager.getContainer(); - + synchronized (this) { int numberOfTries = 2; while (numberOfTries > 0) { @@ -721,7 +721,7 @@ public class JDBCStore extends StoreBase * 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 * @param _conn open connection to be used * @throws SQLException if an error occurs while talking to the database @@ -804,7 +804,7 @@ public class JDBCStore extends StoreBase // TODO: // * Check if ID exists in database and if so use UPDATE. remove(session.getIdInternal(), _conn); - + bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(new BufferedOutputStream(bos)); @@ -916,7 +916,7 @@ public class JDBCStore extends StoreBase this.dataSourceName), e); } } - + if (dataSource != null) { return dataSource.getConnection(); } @@ -988,7 +988,7 @@ public class JDBCStore extends StoreBase } catch (Throwable f) { ExceptionUtils.handleThrowable(f); } - + try { preparedRemoveSql.close(); } catch (Throwable f) { @@ -1002,12 +1002,12 @@ public class JDBCStore extends StoreBase ExceptionUtils.handleThrowable(f); } this.preparedLoadSql = null; - + // Commit if autoCommit is false try { if (!dbConnection.getAutoCommit()) { dbConnection.commit(); - } + } } catch (SQLException e) { manager.getContainer().getLogger().error(sm.getString(getStoreName() + ".commitSQLException"), e); } @@ -1031,7 +1031,7 @@ public class JDBCStore extends StoreBase */ protected void release(Connection conn) { if (dataSource != null) { - close(conn); + close(conn); } } @@ -1049,7 +1049,7 @@ public class JDBCStore extends StoreBase // If not using a connection pool, open a connection to the database this.dbConnection = getConnection(); } - + super.startInternal(); } @@ -1062,7 +1062,7 @@ public class JDBCStore extends StoreBase */ @Override protected synchronized void stopInternal() throws LifecycleException { - + super.stopInternal(); // Close and release everything associated with our db. Modified: tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties Sat Oct 22 21:13:48 2011 @@ -19,7 +19,7 @@ fileStore.saving=Saving Session {0} to f fileStore.loading=Loading Session {0} from file {1} fileStore.removing=Removing Session {0} at file {1} fileStore.deleteFailed=Unable to delete file [{0}] which is preventing the creation of the session storage location -fileStore.createFailed=Unable to create directory [{0}] for the storage of session data +fileStore.createFailed=Unable to create directory [{0}] for the storage of session data JDBCStore.close=Exception closing database connection {0} JDBCStore.saving=Saving Session {0} to database {1} JDBCStore.loading=Loading Session {0} from database {1} @@ -58,7 +58,7 @@ standardSession.getLastAccessedTime.ise= standardSession.getId.ise=getId: Session already invalidated standardSession.getMaxInactiveInterval.ise=getMaxInactiveInterval: Session already invalidated standardSession.getValueNames.ise=getValueNames: Session already invalidated -standardSession.logoutfail=Exception logging out user when expiring session +standardSession.logoutfail=Exception logging out user when expiring session standardSession.notSerializable=Cannot serialize session attribute {0} for session {1} standardSession.removeAttribute.ise=removeAttribute: Session already invalidated standardSession.sessionEvent=Session event listener threw exception Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -120,7 +120,7 @@ public abstract class ManagerBase extend /** * The name of the provider to use to create instances of - * {@link java.security.SecureRandom} which are used to generate session IDs. + * {@link java.security.SecureRandom} which are used to generate session IDs. * If no algorithm is specified the of SHA1PRNG default is used. If an * invalid algorithm and/or provider is specified the SecureRandom instances * will be created using the defaults. If that fails, the SecureRandom @@ -206,7 +206,7 @@ public abstract class ManagerBase extend * The property change support for this component. */ protected PropertyChangeSupport support = new PropertyChangeSupport(this); - + // ------------------------------------------------------------- Properties @@ -421,7 +421,7 @@ public abstract class ManagerBase extend /** * Number of session creations that failed due to maxActiveSessions - * + * * @return The count */ @Override @@ -458,7 +458,7 @@ public abstract class ManagerBase extend public void setProcessingTime(long processingTime) { this.processingTime = processingTime; } - + /** * Return the frequency of manager checks. */ @@ -507,7 +507,7 @@ public abstract class ManagerBase extend long timeNow = System.currentTimeMillis(); Session sessions[] = findSessions(); int expireHere = 0 ; - + if(log.isDebugEnabled()) log.debug("Start expire sessions " + getName() + " at " + timeNow + " sessioncount " + sessions.length); for (int i = 0; i < sessions.length; i++) { @@ -524,9 +524,9 @@ public abstract class ManagerBase extend @Override protected void initInternal() throws LifecycleException { - + super.initInternal(); - + setDistributable(((Context) getContainer()).getDistributable()); } @@ -599,10 +599,10 @@ public abstract class ManagerBase extend /** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session - * id specified will be used as the session id. - * If a new session cannot be created for any reason, return + * id specified will be used as the session id. + * If a new session cannot be created for any reason, return * <code>null</code>. - * + * * @param sessionId The session id which should be used to create the * new session; if <code>null</code>, a new session id will be * generated @@ -611,14 +611,14 @@ public abstract class ManagerBase extend */ @Override public Session createSession(String sessionId) { - + if ((maxActiveSessions >= 0) && (getActiveSessions() >= maxActiveSessions)) { rejectedSessions++; throw new IllegalStateException( sm.getString("managerBase.createSession.ise")); } - + // Recycle or create a Session instance Session session = createEmptySession(); @@ -642,8 +642,8 @@ public abstract class ManagerBase extend return (session); } - - + + /** * Get a session from the recycled ones or create a new empty one. * The PersistentManager manager does not need to create session data @@ -697,7 +697,7 @@ public abstract class ManagerBase extend public void remove(Session session) { remove(session, false); } - + /** * Remove this Session from the active Sessions for this Manager. * @@ -706,7 +706,7 @@ public abstract class ManagerBase extend */ @Override public void remove(Session session, boolean update) { - + // If the session has expired - as opposed to just being removed from // the manager because it is being persisted - update the expired stats if (update) { @@ -744,7 +744,7 @@ public abstract class ManagerBase extend /** * Change the session ID of the current session to a new randomly generated * session ID. - * + * * @param session The session to change the session ID for */ @Override @@ -755,8 +755,8 @@ public abstract class ManagerBase extend container.fireContainerEvent(Context.CHANGE_SESSION_ID_EVENT, new String[] {oldId, newId}); } - - + + // ------------------------------------------------------ Protected Methods @@ -781,9 +781,9 @@ public abstract class ManagerBase extend } result = sessionIdGenerator.generateSessionId(); - + } while (sessions.containsKey(result)); - + return result; } @@ -826,7 +826,7 @@ public abstract class ManagerBase extend } - /** + /** * Total sessions created by this manager. * * @return sessions created @@ -837,7 +837,7 @@ public abstract class ManagerBase extend } - /** + /** * Number of duplicated session IDs generated by the random source. * Anything bigger than 0 means problems. * @@ -853,7 +853,7 @@ public abstract class ManagerBase extend } - /** + /** * Returns the number of active sessions * * @return number of sessions active @@ -942,8 +942,8 @@ public abstract class ManagerBase extend /** * Updates the sessionMaxAliveTime attribute if the candidate value is * larger than the current value. - * - * @param sessionAliveTime The candidate value (in seconds) for the new + * + * @param sessionAliveTime The candidate value (in seconds) for the new * sessionMaxAliveTime value. */ public void updateSessionMaxAliveTime(int sessionAliveTime) { @@ -960,7 +960,7 @@ public abstract class ManagerBase extend * Gets the average time (in seconds) that expired sessions had been * alive based on the last 100 sessions to expire. If less than * 100 sessions have expired then all available data is used. - * + * * @return Average time (in seconds) that expired sessions had been * alive. */ @@ -971,12 +971,12 @@ public abstract class ManagerBase extend synchronized (sessionExpirationTiming) { copy.addAll(sessionExpirationTiming); } - + // Init int counter = 0; int result = 0; Iterator<SessionTiming> iter = copy.iterator(); - + // Calculate average while (iter.hasNext()) { SessionTiming timing = iter.next(); @@ -991,12 +991,12 @@ public abstract class ManagerBase extend return result; } - + /** * Gets the current rate of session creation (in session per minute) based * on the creation time of the previous 100 sessions created. If less than * 100 sessions have been created then all available data is used. - * + * * @return The current rate (in sessions per minute) of session creation */ @Override @@ -1007,13 +1007,13 @@ public abstract class ManagerBase extend synchronized (sessionCreationTiming) { copy.addAll(sessionCreationTiming); } - + // Init long oldest = now; int counter = 0; int result = 0; Iterator<SessionTiming> iter = copy.iterator(); - + // Calculate rate while (iter.hasNext()) { SessionTiming timing = iter.next(); @@ -1033,13 +1033,13 @@ public abstract class ManagerBase extend } return result; } - + /** * Gets the current rate of session expiration (in session per minute) based * on the expiry time of the previous 100 sessions expired. If less than * 100 sessions have expired then all available data is used. - * + * * @return The current rate (in sessions per minute) of session expiration */ @Override @@ -1050,13 +1050,13 @@ public abstract class ManagerBase extend synchronized (sessionExpirationTiming) { copy.addAll(sessionExpirationTiming); } - + // Init long oldest = now; int counter = 0; int result = 0; Iterator<SessionTiming> iter = copy.iterator(); - + // Calculate rate while (iter.hasNext()) { SessionTiming timing = iter.next(); @@ -1079,7 +1079,7 @@ public abstract class ManagerBase extend } - /** + /** * For debugging: return a list of all session ids currently active * */ @@ -1093,7 +1093,7 @@ public abstract class ManagerBase extend } - /** + /** * For debugging: get a session attribute * * @param sessionId @@ -1115,12 +1115,12 @@ public abstract class ManagerBase extend /** * Returns information about the session with the given session id. - * - * <p>The session information is organized as a HashMap, mapping + * + * <p>The session information is organized as a HashMap, mapping * session attribute names to the String representation of their values. * * @param sessionId Session id - * + * * @return HashMap mapping session attribute names to the String * representation of their values, or null if no session with the * specified id exists, or if the session does not have any attributes @@ -1210,7 +1210,7 @@ public abstract class ManagerBase extend return s.getCreationTime(); } - + /** * Return a String rendering of this object. */ @@ -1226,14 +1226,14 @@ public abstract class ManagerBase extend sb.append(']'); return sb.toString(); } - - + + // -------------------- JMX and Registration -------------------- @Override public String getObjectNameKeyProperties() { - + StringBuilder name = new StringBuilder("type=Manager"); - + if (container instanceof Context) { name.append(",context="); String contextName = container.getName(); @@ -1241,7 +1241,7 @@ public abstract class ManagerBase extend name.append('/'); } name.append(contextName); - + Context context = (Context) container; name.append(",host="); name.append(context.getParent().getName()); @@ -1263,7 +1263,7 @@ public abstract class ManagerBase extend /** * Process property change events from our associated Context. - * + * * @param event * The property change event that has occurred */ @@ -1273,7 +1273,7 @@ public abstract class ManagerBase extend // Validate the source of this event if (!(event.getSource() instanceof Context)) return; - + // Process a relevant property change if (event.getPropertyName().equals("sessionTimeout")) { try { @@ -1285,18 +1285,18 @@ public abstract class ManagerBase extend } } } - + // ----------------------------------------------------------- Inner classes - + protected static final class SessionTiming { private long timestamp; private int duration; - + public SessionTiming(long timestamp, int duration) { this.timestamp = timestamp; this.duration = duration; } - + /** * Time stamp associated with this piece of timing information in * milliseconds. @@ -1304,7 +1304,7 @@ public abstract class ManagerBase extend public long getTimestamp() { return timestamp; } - + /** * Duration associated with this piece of timing information in seconds. */ Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManager.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/PersistentManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/PersistentManager.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -64,15 +64,15 @@ public abstract class PersistentManagerB public Void run() throws Exception{ store.clear(); return null; - } - } - + } + } + private class PrivilegedStoreRemove implements PrivilegedExceptionAction<Void> { - private String id; - - PrivilegedStoreRemove(String id) { + private String id; + + PrivilegedStoreRemove(String id) { this.id = id; } @@ -80,30 +80,30 @@ public abstract class PersistentManagerB public Void run() throws Exception{ store.remove(id); return null; - } - } - + } + } + private class PrivilegedStoreLoad implements PrivilegedExceptionAction<Session> { - private String id; - - PrivilegedStoreLoad(String id) { + private String id; + + PrivilegedStoreLoad(String id) { this.id = id; } @Override public Session run() throws Exception{ return store.load(id); - } - } - + } + } + private class PrivilegedStoreSave implements PrivilegedExceptionAction<Void> { - private Session session; - - PrivilegedStoreSave(Session session) { + private Session session; + + PrivilegedStoreSave(Session session) { this.session = session; } @@ -111,9 +111,9 @@ public abstract class PersistentManagerB public Void run() throws Exception{ store.save(session); return null; - } - } - + } + } + private class PrivilegedStoreKeys implements PrivilegedExceptionAction<String[]> { @@ -124,7 +124,7 @@ public abstract class PersistentManagerB @Override public String[] run() throws Exception{ return store.keys(); - } + } } // ----------------------------------------------------- Instance Variables @@ -380,7 +380,7 @@ public abstract class PersistentManagerB if (store == null) return; - try { + try { if (SecurityUtil.isPackageProtectionEnabled()){ try{ AccessController.doPrivileged(new PrivilegedStoreClear()); @@ -404,7 +404,7 @@ public abstract class PersistentManagerB */ @Override public void processExpires() { - + long timeNow = System.currentTimeMillis(); Session sessions[] = findSessions(); int expireHere = 0 ; @@ -420,12 +420,12 @@ public abstract class PersistentManagerB if ((getStore() != null) && (getStore() instanceof StoreBase)) { ((StoreBase) getStore()).processExpires(); } - + long timeEnd = System.currentTimeMillis(); if(log.isDebugEnabled()) log.debug("End expire sessions " + getName() + " processingTime " + (timeEnd - timeNow) + " expired sessions: " + expireHere); processingTime += (timeEnd - timeNow); - + } @@ -567,13 +567,13 @@ public abstract class PersistentManagerB } } - + /** * Remove this Session from the active Sessions for this Manager, * and from the Store. * * @param id Session's id to be removed - */ + */ protected void removeSession(String id){ try { if (SecurityUtil.isPackageProtectionEnabled()){ @@ -586,10 +586,10 @@ public abstract class PersistentManagerB } } else { store.remove(id); - } + } } catch (IOException e) { log.error("Exception removing session " + e.getMessage(), e); - } + } } /** @@ -776,7 +776,7 @@ public abstract class PersistentManagerB } } else { store.save(session); - } + } } catch (IOException e) { log.error(sm.getString ("persistentManager.serializeError", session.getIdInternal(), e)); @@ -821,7 +821,7 @@ public abstract class PersistentManagerB log.debug("Stopping"); setState(LifecycleState.STOPPING); - + if (getStore() != null && saveOnRestart) { unload(); } else { @@ -967,7 +967,7 @@ public abstract class PersistentManagerB ("persistentManager.backupMaxIdle", session.getIdInternal(), Integer.valueOf(timeIdle))); - + try { writeSession(session); } catch (IOException e) { Modified: tomcat/trunk/java/org/apache/catalina/session/StandardManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardManager.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/StandardManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -470,7 +470,7 @@ public class StandardManager extends Man log.debug("Stopping"); setState(LifecycleState.STOPPING); - + // Write out sessions try { unload(); Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -92,7 +92,7 @@ public class StandardSession implements static { STRICT_SERVLET_COMPLIANCE = Globals.STRICT_SERVLET_COMPLIANCE; - + String activityCheck = System.getProperty( "org.apache.catalina.session.StandardSession.ACTIVITY_CHECK"); if (activityCheck == null) { @@ -111,7 +111,7 @@ public class StandardSession implements Boolean.valueOf(lastAccessAtStart).booleanValue(); } } - + // ----------------------------------------------------------- Constructors @@ -240,7 +240,7 @@ public class StandardSession implements */ protected volatile boolean isValid = false; - + /** * Internal notes associated with this session by Catalina components * and event listeners. <b>IMPLEMENTATION NOTE:</b> This object is @@ -291,7 +291,7 @@ public class StandardSession implements */ protected transient AtomicInteger accessCount = null; - + // ----------------------------------------------------- Session Properties @@ -385,7 +385,7 @@ public class StandardSession implements if (manager != null) manager.add(this); - + if (notify) { tellNew(); } @@ -637,7 +637,7 @@ public class StandardSession implements return true; } - if (maxInactiveInterval >= 0) { + if (maxInactiveInterval >= 0) { long timeNow = System.currentTimeMillis(); int timeIdle; if (LAST_ACCESS_AT_START) { @@ -759,11 +759,11 @@ public class StandardSession implements // Mark this session as "being expired" expiring = true; - + // Notify interested application event listeners // FIXME - Assumes we call listeners in reverse order Context context = (Context) manager.getContainer(); - + // The call to expire() may not have been triggered by the webapp. // Make sure the webapp's class loader is set when calling the // listeners @@ -904,7 +904,7 @@ public class StandardSession implements if (ACTIVITY_CHECK) { accessCount = new AtomicInteger(); } - + // Notify interested session event listeners fireSessionEvent(Session.SESSION_ACTIVATED_EVENT, null); @@ -1446,7 +1446,7 @@ public class StandardSession implements ((HttpSessionBindingListener) value).valueBound(event); } catch (Throwable t){ manager.getContainer().getLogger().error - (sm.getString("standardSession.bindingEvent"), t); + (sm.getString("standardSession.bindingEvent"), t); } } } @@ -1466,9 +1466,9 @@ public class StandardSession implements (sm.getString("standardSession.bindingEvent"), t); } } - + if ( !notify ) return; - + // Notify interested application event listeners Context context = (Context) manager.getContainer(); Object listeners[] = context.getApplicationEventListeners(); @@ -1652,7 +1652,7 @@ public class StandardSession implements Object value = attributes.get(keys[i]); if (value == null) continue; - else if ( (value instanceof Serializable) + else if ( (value instanceof Serializable) && (!exclude(keys[i]) )) { saveNames.add(keys[i]); saveValues.add(value); Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StandardSessionFacade.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. Modified: tomcat/trunk/java/org/apache/catalina/session/StoreBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StoreBase.java?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/StoreBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/StoreBase.java Sat Oct 22 21:13:48 2011 @@ -5,9 +5,9 @@ * 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. @@ -60,7 +60,7 @@ public abstract class StoreBase extends */ protected Manager manager; - + // ------------------------------------------------------------- Properties /** @@ -190,8 +190,8 @@ public abstract class StoreBase extends protected void initInternal() { // NOOP } - - + + /** * Start this component and implement the requirements * of {@link LifecycleBase#startInternal()}. @@ -201,7 +201,7 @@ public abstract class StoreBase extends */ @Override protected synchronized void startInternal() throws LifecycleException { - + setState(LifecycleState.STARTING); } @@ -218,14 +218,14 @@ public abstract class StoreBase extends setState(LifecycleState.STOPPING); } - - + + @Override protected void destroyInternal() { // NOOP } - - + + /** * Return a String rendering of this object. */ Modified: tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml?rev=1187795&r1=1187794&r2=1187795&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml (original) +++ tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml Sat Oct 22 21:13:48 2011 @@ -22,10 +22,10 @@ domain="Catalina" group="Manager" type="org.apache.catalina.session.StandardManager"> - + <attribute name="activeSessions" description="Number of active sessions at this moment" - type="int" + type="int" writeable="false"/> <attribute name="className" @@ -37,7 +37,7 @@ description="The distributable flag for Sessions created by this Manager" type="boolean"/> - + <attribute name="duplicates" description="Number of duplicated session ids generated" type="int" /> @@ -45,12 +45,12 @@ <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" /> @@ -70,7 +70,7 @@ (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"/> @@ -82,7 +82,7 @@ <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"/> @@ -108,12 +108,12 @@ <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="sessionIdLength" description="The session id length (in bytes) of Sessions created by this Manager" @@ -122,7 +122,7 @@ <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" @@ -131,23 +131,23 @@ <attribute name="randomFile" description="File source of random - /dev/urandom or a pipe that will be used when the Manager is next started" type="java.lang.String"/> - + <attribute name="randomFileCurrent" description="File source of random - /dev/urandom or a pipe currently being used" type="java.lang.String" writeable="false"/> - + <attribute name="rejectedSessions" description="Number of sessions we rejected due to maxActive beeing reached" type="int" writeable="false"/> - + <operation name="backgroundProcess" description="Invalidate all sessions that have expired." impact="ACTION" returnType="void"> </operation> - + <operation name="expireSession" description="Expire a session" impact="ACTION" @@ -156,7 +156,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getCreationTime" description="Get the creation time" impact="ACTION" @@ -165,7 +165,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getCreationTimestamp" description="Get the creation timestamp" impact="ACTION" @@ -174,7 +174,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getLastAccessedTime" description="Get the last access time" impact="ACTION" @@ -192,7 +192,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getSessionAttribute" description="Return a session attribute" impact="ACTION" @@ -221,7 +221,7 @@ <attribute name="activeSessions" description="Number of active sessions at this moment" - type="int" + type="int" writeable="false"/> <attribute name="className" @@ -232,7 +232,7 @@ <attribute name="distributable" description="The distributable flag for Sessions created by this Manager" type="boolean"/> - + <attribute name="duplicates" description="Number of duplicated session ids generated" type="int" /> @@ -240,17 +240,17 @@ <attribute name="expiredSessions" description="Number of sessions that expired ( doesn't include explicit invalidations )" type="long" /> - + <attribute name="loaded" description="If the session id is loaded in memory?" type="boolean" writeable = "false" /> - + <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" /> @@ -259,11 +259,11 @@ 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"/> @@ -271,7 +271,7 @@ <attribute name="maxInactiveInterval" description="The default maximum inactive interval for Sessions created by this Manager" 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"/> @@ -288,11 +288,11 @@ <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"/> @@ -310,7 +310,7 @@ <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" @@ -324,7 +324,7 @@ <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" @@ -333,7 +333,7 @@ <attribute name="randomFile" description="File source of random - /dev/urandom or a pipe" type="java.lang.String"/> - + <attribute name="rejectedSessions" description="Number of sessions we rejected due to maxActive beeing reached" type="int" @@ -344,7 +344,7 @@ impact="ACTION" returnType="void"> </operation> - + <operation name="expireSession" description="Expire a session" impact="ACTION" @@ -353,7 +353,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getCreationTime" description="Get the creation time" impact="ACTION" @@ -362,7 +362,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getCreationTimestamp" description="Get the creation timestamp" impact="ACTION" @@ -371,7 +371,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getLastAccessedTime" description="Get the last access time" impact="ACTION" @@ -389,7 +389,7 @@ description="Id of the session" type="java.lang.String"/> </operation> - + <operation name="getSessionAttribute" description="Return a session attribute" impact="ACTION" --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org