public void add(Session session) {
sessions.put(session.getIdInternal(), session);
- int size = sessions.size();
+ int size = getActiveSessions();
if( size > maxActive ) {
synchronized(maxActiveUpdateLock) {
if( size > maxActive ) {
public Session createSession(String sessionId) {
if ((maxActiveSessions >= 0) &&
- (sessions.size() >= maxActiveSessions)) {
+ (getActiveSessions() >= maxActiveSessions)) {
rejectedSessions++;
throw new IllegalStateException(
sm.getString("managerBase.createSession.ise"));
while (i.hasNext()) {
Map.Entry<?,?> e = i.next();
MapEntry entry = (MapEntry) super.get(e.getKey());
- if (entry!=null && entry.isPrimary() && value.equals(entry.getValue())) return true;
+ if (entry!=null && entry.isActive() && value.equals(entry.getValue())) return true;
}//while
return false;
}//end if
Map.Entry<?,?> e = i.next();
Object key = e.getKey();
MapEntry entry = (MapEntry)super.get(key);
- if ( entry != null && entry.isPrimary() ) {
+ if ( entry != null && entry.isActive() ) {
set.add(new MapEntry(key, entry.getValue()));
}
}
Map.Entry<?,?> e = i.next();
Object key = e.getKey();
MapEntry entry = (MapEntry)super.get(key);
- if ( entry!=null && entry.isPrimary() ) set.add(key);
+ if ( entry!=null && entry.isActive() ) set.add(key);
}
return Collections.unmodifiableSet(set);
Map.Entry<?,?> e = it.next();
if ( e != null ) {
MapEntry entry = (MapEntry) super.get(e.getKey());
- if (entry!=null && entry.isPrimary() && entry.getValue() != null) counter++;
+ if (entry!=null && entry.isActive() && entry.getValue() != null) counter++;
}
}
return counter;
while ( i.hasNext() ) {
Map.Entry<?,?> e = i.next();
MapEntry entry = (MapEntry)super.get(e.getKey());
- if (entry!=null && entry.isPrimary() && entry.getValue()!=null) values.add(entry.getValue());
+ if (entry!=null && entry.isActive() && entry.getValue()!=null) values.add(entry.getValue());
}
return Collections.unmodifiableCollection(values);
}
}
public boolean isPrimary() {
- return ( (!proxy) && (!backup));
+ return (!proxy && !backup);
}
+ public boolean isActive() {
+ return !proxy;
+ }
+
public void setProxy(boolean proxy) {
this.proxy = proxy;
}
<code>SimpleTcpReplicationManager.startInternal()</code>. (markt)
</fix>
<fix>
+ <bug>49407</bug>: Change the BackupManager so it is consistent with
+ DeltaManager and reports both primary and backup sessions when active
+ sessions are requested. (markt)
+ </fix>
+ <fix>
<bug>49445</bug>: When session ID is changed after authentication,
ensure the DeltaManager replicates the change in ID to the other nodes
in the cluster. (kfujino)