ASF Bugzilla – Attachment 26679 Details for
Bug 48717
Session listeners not called on cluster node start
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Adds sessionDidActivate calss
bug48717-patch.txt (text/plain), 3.54 KB, created by
Mark Thomas
on 2011-02-18 06:45:45 UTC
(
hide
)
Description:
Adds sessionDidActivate calss
Filename:
MIME Type:
Creator:
Mark Thomas
Created:
2011-02-18 06:45:45 UTC
Size:
3.54 KB
patch
obsolete
>Index: container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java >=================================================================== >--- container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java (revision 1071941) >+++ container/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java (working copy) >@@ -36,6 +36,7 @@ > > import javax.servlet.ServletContext; > import javax.servlet.http.HttpSession; >+import javax.servlet.http.HttpSessionActivationListener; > import javax.servlet.http.HttpSessionAttributeListener; > import javax.servlet.http.HttpSessionBindingEvent; > import javax.servlet.http.HttpSessionBindingListener; >@@ -1429,9 +1430,39 @@ > if (notes == null) { > notes = new Hashtable(); > } >+ activate(); > } > > /** >+ * Perform internal processing required to activate this >+ * session. >+ */ >+ private void activate() { >+ >+ // Notify interested session event listeners >+ fireSessionEvent(Session.SESSION_ACTIVATED_EVENT, null); >+ >+ // Notify ActivationListeners >+ HttpSessionEvent event = null; >+ String keys[] = keys(); >+ for (int i = 0; i < keys.length; i++) { >+ Object attribute = attributes.get(keys[i]); >+ if (attribute instanceof HttpSessionActivationListener) { >+ if (event == null) >+ event = new HttpSessionEvent(getSession()); >+ try { >+ ((HttpSessionActivationListener)attribute) >+ .sessionDidActivate(event); >+ } catch (Throwable t) { >+ manager.getContainer().getLogger().error >+ (sm.getString("deltaSession.attributeEvent"), t); >+ } >+ } >+ } >+ >+ } >+ >+ /** > * Write a serialized version of this session object to the specified object > * output stream. > * <p> >Index: container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties >=================================================================== >--- container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties (revision 1071941) >+++ container/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties (working copy) >@@ -59,6 +59,7 @@ > deltaManager.unableSerializeSessionID =Unable to serialize sessionID [{0}] > deltaRequest.showPrincipal=Principal [{0}] is set to session {1} > deltaRequest.wrongPrincipalClass=DeltaManager only support GenericPrincipal. Your realm used principal class {0}. >+deltaSession.attributeEvent=Session attribute event listener threw exception > deltaSession.notifying=Notifying cluster of expiration primary={0} sessionId [{1}] > deltaSession.valueBound.ex=Session bound listener throw an exception > deltaSession.valueBinding.ex=Session binding listener throw an exception >Index: container/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java >=================================================================== >--- container/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java (revision 1071941) >+++ container/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java (working copy) >@@ -593,6 +593,7 @@ > if (notes == null) { > notes = new Hashtable(); > } >+ activate(); > } > > public synchronized void writeExternal(ObjectOutput out ) throws java.io.IOException {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 48717
: 26679