revised the way we check the session expiration
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/session-checker@121959 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
751717fe00
commit
0b847a4ef2
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>session-checker</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.4.0-SNAPSHOT</version>
|
||||
<version>0.5.0-SNAPSHOT</version>
|
||||
<name>gCube Session Checker Widget</name>
|
||||
<description>
|
||||
gCube Session Checker Widget is a GWT Widget that can be used to automatically check if the session expired.
|
||||
|
|
|
@ -120,7 +120,11 @@ public class CheckSession {
|
|||
}
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Throwable caught) { }
|
||||
public void onFailure(Throwable caught) {
|
||||
mask(true);
|
||||
stopPolling();
|
||||
showLogoutDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -56,13 +56,13 @@ public class SessionCheckerServiceImpl extends RemoteServiceServlet implements
|
|||
if (session == null || session.getUsername() == null) {
|
||||
UserLocalServiceUtil.getService();
|
||||
_log.warn("Liferay Portal Detected but session Expired");
|
||||
return new SessionInfoBean("",""); //tells session expired
|
||||
return new SessionInfoBean(null,null); //tells session expired
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (isWithinPortal()) {
|
||||
_log.warn("Liferay Portal Detected but session Expired");
|
||||
return new SessionInfoBean("",""); //tells session expired
|
||||
return new SessionInfoBean(null,null); //tells session expired
|
||||
}
|
||||
else {
|
||||
_log.warn("Stopping session polling as i think you are in development mode");
|
||||
|
|
Loading…
Reference in New Issue