Author: rareddy
Date: 2009-08-12 18:18:47 -0400 (Wed, 12 Aug 2009)
New Revision: 1237
Modified:
trunk/build/kit-runtime/deploy.properties
trunk/engine/src/main/java/com/metamatrix/platform/security/api/service/SessionServiceInterface.java
trunk/runtime/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java
Log:
TEIID-774
Modified: trunk/build/kit-runtime/deploy.properties
===================================================================
--- trunk/build/kit-runtime/deploy.properties 2009-08-12 19:42:56 UTC (rev 1236)
+++ trunk/build/kit-runtime/deploy.properties 2009-08-12 22:18:47 UTC (rev 1237)
@@ -88,8 +88,8 @@
#Maximum number of sessions allowed by the system
session.maxSessions=5000
-#Max allowed time before the session is timed out between two ping calls
-session.timeoutInMilli=1800000
+#Max allowed time before the session is terminated by the system (default unlimited,
below value is 24hrs)
+#session.expirationTimeInMilli=86400000
#
# Membership Service Settings (handles the authentication of the user)
Modified:
trunk/engine/src/main/java/com/metamatrix/platform/security/api/service/SessionServiceInterface.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/platform/security/api/service/SessionServiceInterface.java 2009-08-12
19:42:56 UTC (rev 1236)
+++
trunk/engine/src/main/java/com/metamatrix/platform/security/api/service/SessionServiceInterface.java 2009-08-12
22:18:47 UTC (rev 1237)
@@ -58,10 +58,10 @@
public static String NAME = "SessionService"; //$NON-NLS-1$
public static final String DEFAULT_MAX_SESSIONS = "5000"; //$NON-NLS-1$
- public static final String DEFAULT_SESSION_TIMEOUT = "600000";
//$NON-NLS-1$
+ public static final String DEFAULT_SESSION_EXPIRATION = "0"; //$NON-NLS-1$
public static final String MAX_SESSIONS = "session.maxSessions";
//$NON-NLS-1$
- public static final String SESSION_TIMEOUT = "session.timeoutInMilli";
//$NON-NLS-1$
+ public static final String SESSION_EXPIRATION =
"session.expirationTimeInMilli"; //$NON-NLS-1$
/**
* Create a session for the given user authenticating against the given
<code>Credentials</code>.
Modified:
trunk/runtime/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java
===================================================================
---
trunk/runtime/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java 2009-08-12
19:42:56 UTC (rev 1236)
+++
trunk/runtime/src/main/java/com/metamatrix/platform/security/session/service/SessionServiceImpl.java 2009-08-12
22:18:47 UTC (rev 1237)
@@ -74,7 +74,7 @@
* Configuration state
*/
private long sessionMaxLimit;
- private long sessionTimeLimit;
+ private long sessionExpirationTimeLimit;
/*
* Injected state
@@ -99,7 +99,7 @@
if (currentTime - info.getLastPingTime() > ServerConnection.PING_INTERVAL * 5)
{
LogManager.logInfo(LogConstants.CTX_SESSION, DQPEmbeddedPlugin.Util.getString(
"SessionServiceImpl.keepaliveFailed", info.getSessionID())); //$NON-NLS-1$
closeSession(info.getSessionID());
- } else if (sessionTimeLimit > 0 && currentTime - info.getTimeCreated()
> sessionTimeLimit) {
+ } else if (sessionExpirationTimeLimit > 0 && currentTime -
info.getTimeCreated() > sessionExpirationTimeLimit) {
LogManager.logInfo(LogConstants.CTX_SESSION, DQPEmbeddedPlugin.Util.getString(
"SessionServiceImpl.expireSession", info.getSessionID())); //$NON-NLS-1$
closeSession(info.getSessionID());
}
@@ -302,23 +302,7 @@
public void setMembershipService(MembershipServiceInterface membershipService) {
this.membershipService = membershipService;
}
-
- public long getSessionMaxLimit() {
- return sessionMaxLimit;
- }
-
- public void setSessionMaxLimit(long sessionMaxLimit) {
- this.sessionMaxLimit = sessionMaxLimit;
- }
-
- public long getSessionTimeLimit() {
- return sessionTimeLimit;
- }
-
- public void setSessionTimeLimit(long sessionTimeLimit) {
- this.sessionTimeLimit = sessionTimeLimit;
- }
-
+
@Inject
public void setDqpCore(DQPCore dqpCore) {
this.dqpCore = dqpCore;
@@ -327,7 +311,7 @@
@Override
public void initialize(Properties props) throws ApplicationInitializationException {
this.sessionMaxLimit = Long.parseLong(props.getProperty(MAX_SESSIONS,
DEFAULT_MAX_SESSIONS));
- this.sessionTimeLimit = Long.parseLong(props.getProperty(SESSION_TIMEOUT,
DEFAULT_SESSION_TIMEOUT));
+ this.sessionExpirationTimeLimit = Long.parseLong(props.getProperty(SESSION_EXPIRATION,
DEFAULT_SESSION_EXPIRATION));
}
@Override
Show replies by date