summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/server
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@itmill.com>2011-08-24 13:07:30 +0000
committerHenri Sara <henri.sara@itmill.com>2011-08-24 13:07:30 +0000
commit082f3762e6edbe30ca295504d4e0799b51865bd5 (patch)
treeadf3e96ad80506cc51fbc64a5c81bd186ada35b6 /src/com/vaadin/terminal/gwt/server
parent5f90e8036db9c5354bb9671518aa3402dec75854 (diff)
parentd2df3d92a39799ab992a5a5945fc9f96f3eb1fe1 (diff)
downloadvaadin-framework-082f3762e6edbe30ca295504d4e0799b51865bd5.tar.gz
vaadin-framework-082f3762e6edbe30ca295504d4e0799b51865bd5.zip
Merged changes from 6.6 to 6.7
svn changeset:20625/svn branch:6.7
Diffstat (limited to 'src/com/vaadin/terminal/gwt/server')
-rw-r--r--src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java
index dd5d61ea57..aba772a26e 100644
--- a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java
+++ b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java
@@ -107,8 +107,16 @@ public class PortletApplicationContext2 extends AbstractWebApplicationContext {
public static PortletApplicationContext2 getApplicationContext(
PortletSession session) {
- PortletApplicationContext2 cx = (PortletApplicationContext2) session
- .getAttribute(PortletApplicationContext2.class.getName());
+ Object cxattr = session.getAttribute(PortletApplicationContext2.class
+ .getName());
+ PortletApplicationContext2 cx = null;
+ // can be false also e.g. if old context comes from another
+ // classloader when using
+ // <private-session-attributes>false</private-session-attributes>
+ // and redeploying the portlet - see #7461
+ if (cxattr instanceof PortletApplicationContext2) {
+ cx = (PortletApplicationContext2) cxattr;
+ }
if (cx == null) {
cx = new PortletApplicationContext2();
session.setAttribute(PortletApplicationContext2.class.getName(), cx);