if (result.next()) session = new Session(id, result.getString(_jdbcSessionIdMgr._sessionTableRowId), result.getLong("createTime"), result.getLong("accessTime")); session.setCookieSet(result.getLong("cookieTime")); session.setLastAccessedTime(result.getLong("lastAccessTime")); session.setLastNode(result.getString("lastNode")); session.setLastSaved(result.getLong("lastSavedTime")); session.setExpiryTime(result.getLong("expiryTime")); session.setCanonicalContext(result.getString("contextPath")); session.setVirtualHost(result.getString("virtualHost")); session.addAttributes((Map<String,Object>)o); ois.close();
statement = connection.prepareStatement(_jdbcSessionIdMgr._insertSession); statement.setString(1, rowId); //rowId statement.setString(2, session.getId()); //session id statement.setString(3, session.getCanonicalContext()); //context path statement.setString(4, session.getVirtualHost()); //first vhost statement.setString(5, getSessionIdManager().getWorkerName());//my node id statement.setLong(6, session.getAccessed());//accessTime statement.setLong(7, session.getLastAccessedTime()); //lastAccessTime statement.setLong(8, session.getCreationTime()); //time created statement.setLong(9, session.getCookieSet());//time cookie was set statement.setLong(10, now); //last saved time statement.setLong(11, session.getExpiryTime()); oos.writeObject(session.getAttributeMap()); byte[] bytes = baos.toByteArray(); session.setRowId(rowId); //set it on the in-memory data as well as in db session.setLastSaved(now);
_sessions.put(session.getClusterId(), session); session.timeout(); successfullyExpiredIds.add(session.getClusterId());
if (!session.getLastNode().equals(getSessionIdManager().getWorkerName()) || memSession==null) LOG.debug("getSession("+idInCluster+"): lastNode="+session.getLastNode()+" thisNode="+getSessionIdManager().getWorkerName()); session.setLastNode(getSessionIdManager().getWorkerName()); _sessions.put(idInCluster, session); session.didActivate();
if (!session.getLastNode().equals(getSessionIdManager().getWorkerName()) || memSession==null) LOG.debug("getSession("+idInCluster+"): lastNode="+session.getLastNode()+" thisNode="+getSessionIdManager().getWorkerName()); session.setLastNode(getSessionIdManager().getWorkerName()); _sessions.put(idInCluster, session); session.didActivate();
if (!session.getLastNode().equals(getSessionIdManager().getWorkerName()) || memSession==null) LOG.debug("getSession("+idInCluster+"): lastNode="+session.getLastNode()+" thisNode="+getSessionIdManager().getWorkerName()); session.setLastNode(getSessionIdManager().getWorkerName()); _sessions.put(idInCluster, session); session.didActivate();
data.setLastNode(getSessionIdManager().getWorkerName()); session = new Session(now,data); _sessions.put(idInCluster, session); session.didActivate();
data.setLastNode(getSessionIdManager().getWorkerName()); session = new Session(now,data); _sessions.put(idInCluster, session); session.didActivate();
_sessions.put(session.getClusterId(), session); session.timeout(); successfullyExpiredIds.add(session.getClusterId());
result.getLong(_sessionTableSchema.getAccessTimeColumn()), maxInterval); session.setCookieSet(result.getLong(_sessionTableSchema.getCookieTimeColumn())); session.setLastAccessedTime(result.getLong(_sessionTableSchema.getLastAccessTimeColumn())); session.setLastNode(result.getString(_sessionTableSchema.getLastNodeColumn())); session.setLastSaved(result.getLong(_sessionTableSchema.getLastSavedTimeColumn())); session.setExpiryTime(result.getLong(_sessionTableSchema.getExpiryTimeColumn())); session.setCanonicalContext(result.getString(_sessionTableSchema.getContextPathColumn())); session.setVirtualHost(result.getString(_sessionTableSchema.getVirtualHostColumn())); session.addAttributes((Map<String,Object>)o);
if (session != null) session.timeout(); itor.remove();
if (session != null) session.timeout(); itor.remove();
result.getLong(_sessionTableSchema.getAccessTimeColumn()), maxInterval); session.setCookieSetTime(result.getLong(_sessionTableSchema.getCookieTimeColumn())); session.setLastAccessedTime(result.getLong(_sessionTableSchema.getLastAccessTimeColumn())); session.setLastNode(result.getString(_sessionTableSchema.getLastNodeColumn())); session.setLastSaved(result.getLong(_sessionTableSchema.getLastSavedTimeColumn())); session.setExpiryTime(result.getLong(_sessionTableSchema.getExpiryTimeColumn())); session.setCanonicalContext(result.getString(_sessionTableSchema.getContextPathColumn())); session.setVirtualHost(result.getString(_sessionTableSchema.getVirtualHostColumn())); session.addAttributes((Map<String,Object>)o);
if (result.next()) session = new Session(id, result.getString(_jdbcSessionIdMgr._sessionTableRowId), result.getLong("createTime"), result.getLong("accessTime")); session.setCookieSet(result.getLong("cookieTime")); session.setLastAccessedTime(result.getLong("lastAccessTime")); session.setLastNode(result.getString("lastNode")); session.setLastSaved(result.getLong("lastSavedTime")); session.setExpiryTime(result.getLong("expiryTime")); session.setCanonicalContext(result.getString("contextPath")); session.setVirtualHost(result.getString("virtualHost")); session.addAttributes((Map<String,Object>)o); ois.close();
if (result.next()) session = new Session(id, result.getString(_jdbcSessionIdMgr._sessionTableRowId), result.getLong("createTime"), result.getLong("accessTime")); session.setCookieSet(result.getLong("cookieTime")); session.setLastAccessedTime(result.getLong("lastAccessTime")); session.setLastNode(result.getString("lastNode")); session.setLastSaved(result.getLong("lastSavedTime")); session.setExpiryTime(result.getLong("expiryTime")); session.setCanonicalContext(result.getString("contextPath")); session.setVirtualHost(result.getString("virtualHost")); session.addAttributes((Map<String,Object>)o); ois.close();
statement = connection.prepareStatement(_jdbcSessionIdMgr._insertSession); statement.setString(1, rowId); //rowId statement.setString(2, session.getId()); //session id statement.setString(3, session.getCanonicalContext()); //context path statement.setString(4, session.getVirtualHost()); //first vhost statement.setString(5, getSessionIdManager().getWorkerName());//my node id statement.setLong(6, session.getAccessed());//accessTime statement.setLong(7, session.getLastAccessedTime()); //lastAccessTime statement.setLong(8, session.getCreationTime()); //time created statement.setLong(9, session.getCookieSet());//time cookie was set statement.setLong(10, now); //last saved time statement.setLong(11, session.getExpiryTime()); oos.writeObject(session.getAttributeMap()); byte[] bytes = baos.toByteArray(); session.setRowId(rowId); //set it on the in-memory data as well as in db session.setLastSaved(now);
if (result.next()) session = new Session(id, result.getString(_jdbcSessionIdMgr._sessionTableRowId), result.getLong("createTime"), result.getLong("accessTime")); session.setCookieSet(result.getLong("cookieTime")); session.setLastAccessedTime(result.getLong("lastAccessTime")); session.setLastNode(result.getString("lastNode")); session.setLastSaved(result.getLong("lastSavedTime")); session.setExpiryTime(result.getLong("expiryTime")); session.setCanonicalContext(result.getString("contextPath")); session.setVirtualHost(result.getString("virtualHost")); session.addAttributes((Map<String,Object>)o); ois.close();
statement = connection.prepareStatement(_jdbcSessionIdMgr._updateSession); statement.setString(1, getSessionIdManager().getWorkerName());//my node id statement.setLong(2, data.getAccessed());//accessTime statement.setLong(3, data.getLastAccessedTime()); //lastAccessTime statement.setLong(4, now); //last saved time statement.setLong(5, data.getExpiryTime()); oos.writeObject(data.getAttributeMap()); byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); statement.setString(7, data.getRowId()); //rowId statement.executeUpdate(); data.setLastSaved(now); if (LOG.isDebugEnabled()) LOG.debug("Updated session "+data);
statement = connection.prepareStatement(_jdbcSessionIdMgr._updateSession); statement.setString(1, getSessionIdManager().getWorkerName());//my node id statement.setLong(2, data.getAccessed());//accessTime statement.setLong(3, data.getLastAccessedTime()); //lastAccessTime statement.setLong(4, now); //last saved time statement.setLong(5, data.getExpiryTime()); oos.writeObject(data.getAttributeMap()); byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); statement.setString(7, data.getRowId()); //rowId statement.executeUpdate(); data.setLastSaved(now); if (LOG.isDebugEnabled()) LOG.debug("Updated session "+data);
statement = connection.prepareStatement(_jdbcSessionIdMgr._updateSession); statement.setString(1, getSessionIdManager().getWorkerName());//my node id statement.setLong(2, data.getAccessed());//accessTime statement.setLong(3, data.getLastAccessedTime()); //lastAccessTime statement.setLong(4, now); //last saved time statement.setLong(5, data.getExpiryTime()); oos.writeObject(data.getAttributeMap()); byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); statement.setString(7, data.getRowId()); //rowId statement.executeUpdate(); data.setLastSaved(now); if (LOG.isDebugEnabled()) LOG.debug("Updated session "+data);