Updated Branches:
  refs/heads/wicket-6.x 9ad992b63 -> 3597c84cc

WICKET-5380 Wicket rebinds the SessionEntry session attribute and this causes 
problems in Glassfish

Bind SessionEntry as an attribute in the http session only when freshly created.
Do not set it on every request because this causes notifications in Glassfish 
which are too early for the logic this HttpSessionBindingListener is used for.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3597c84c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3597c84c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3597c84c

Branch: refs/heads/wicket-6.x
Commit: 3597c84cc1ff78c75938dfb58d41efd8f4c510e8
Parents: 9ad992b
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Mon Sep 30 12:39:04 2013 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Mon Sep 30 12:39:04 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/page/PageStoreManager.java    | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/3597c84c/wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java 
b/wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java
index ee5ac41..c3da9dc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java
+++ b/wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java
@@ -365,18 +365,13 @@ public class PageStoreManager extends AbstractPageManager
                 */
                private SessionEntry getSessionEntry(boolean create)
                {
-                       SessionEntry entry = 
(SessionEntry)getSessionAttribute(getAttributeName());
+                       String attributeName = getAttributeName();
+                       SessionEntry entry = 
(SessionEntry)getSessionAttribute(attributeName);
                        if (entry == null && create)
                        {
                                bind();
                                entry = new SessionEntry(applicationName, 
getSessionId());
-                       }
-                       if (entry != null)
-                       {
-                               synchronized (entry)
-                               {
-                                       setSessionAttribute(getAttributeName(), 
entry);
-                               }
+                               setSessionAttribute(attributeName, entry);
                        }
                        return entry;
                }

Reply via email to