Skip to content

Commit

Permalink
Merge branch '6.0' into 6.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	loader/build.xml
#	loader/pom.xml
  • Loading branch information
michaeloffner committed Mar 18, 2024
2 parents 400a1a1 + 1231767 commit a569baf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
37 changes: 24 additions & 13 deletions core/src/main/java/lucee/runtime/type/scope/ScopeContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -993,24 +993,35 @@ public void invalidateUserScope(PageContextImpl pc, boolean migrateSessionData,
ApplicationContext appContext = pc.getApplicationContext();
RefBoolean isNew = new RefBooleanImpl();

// get in memory scopes
Map<String, Scope> clientContext = getSubMap(cfClientContexts, appContext.getName());
UserScope oldClient = (UserScope) clientContext.get(pc.getCFID());
Map<String, Scope> sessionContext = getSubMap(cfSessionContexts, appContext.getName());
UserScope oldSession = (UserScope) sessionContext.get(pc.getCFID());
boolean hasClientManagment = appContext.isSetClientManagement();
boolean hasSessionManagment = appContext.isSetSessionManagement();

ApplicationListener listener = factory.getConfig().getApplicationListener();
try {
listener.onSessionEnd(factory, appContext.getName(), pc.getCFID());
// get in memory scopes
UserScope oldClient = null;
if (hasClientManagment) {
Map<String, Scope> clientContext = getSubMap(cfClientContexts, appContext.getName());
oldClient = (UserScope) clientContext.get(pc.getCFID());
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
ExceptionHandler.log(pc.getConfig(), Caster.toPageException(t));
UserScope oldSession = null;
if (hasSessionManagment) {
Map<String, Scope> sessionContext = getSubMap(cfSessionContexts, appContext.getName());
oldSession = (UserScope) sessionContext.get(pc.getCFID());
}

if (hasSessionManagment) {
ApplicationListener listener = factory.getConfig().getApplicationListener();
try {
listener.onSessionEnd(factory, appContext.getName(), pc.getCFID());
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
ExceptionHandler.log(pc.getConfig(), Caster.toPageException(t));
}
}

// remove Scopes completly
removeCFSessionScope(pc);
removeClientScope(pc);
if (hasSessionManagment) removeCFSessionScope(pc);
if (hasClientManagment) removeClientScope(pc);

pc.resetIdAndToken();
pc.resetSession();
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.1.0.77-SNAPSHOT"/>
<property name="version" value="6.1.0.78-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.1.0.77-SNAPSHOT</version>
<version>6.1.0.78-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit a569baf

Please sign in to comment.