int count=cfids.length;
for(int y=0;y<cfids.length;y++) {
cfid=cfids[y];
o=fhm.get(cfid);
if(!(o instanceof MemoryScope)) continue;
MemoryScope scope=(MemoryScope) o;
// close
if(scope.isExpired()) {
// TODO macht das sinn? ist das nicht kopierleiche?
ApplicationImpl application=(ApplicationImpl) applicationContextes.get(applicationName);
long appLastAccess=0;
if(application!=null){
appLastAccess=application.getLastAccess();
application.touch();
}
scope.touch();
try {
if(type==Scope.SCOPE_SESSION)listener.onSessionEnd(cfmlFactory,(String)applicationName,(String)cfid);
}
catch (Throwable t) {t.printStackTrace();
ExceptionHandler.log(cfmlFactory.getConfig(),Caster.toPageException(t));
}
finally {
if(application!=null)application.setLastAccess(appLastAccess);
fhm.remove(cfids[y]);
scope.release();
getLog().info("scope-context", "remove memory based "+VariableInterpreter.scopeInt2String(type)+" scope for "+applicationName+"/"+cfid);
count--;
}
}
}