You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2013/10/28 09:46:14 UTC

[07/27] git commit: WICKET-5380 Wicket rebinds the SessionEntry session attribute and this causes problems in Glassfish

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-4997
Commit: 3597c84cc1ff78c75938dfb58d41efd8f4c510e8
Parents: 9ad992b
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Sep 30 12:39:04 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
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;
 		}