Skip to content

Commit

Permalink
Fix ClientScope to be in every application definition
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Dec 6, 2024
1 parent d90c0fe commit e1f04d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ public class ClientScopeListener extends BaseInterceptor {
* BIF Invocation
*/
@InterceptionPoint
public void onApplicationStart( IStruct interceptData ) {

public void onApplicationDefined( IStruct interceptData ) {
// Check for existing client context
BaseApplicationListener listener = ( BaseApplicationListener ) interceptData.get( Key.listener );
RequestBoxContext context = listener.getRequestContext();
Expand Down Expand Up @@ -152,7 +151,6 @@ private void createClientCache( IStruct settings ) {
.map( ( String setting ) -> setting.trim().isEmpty() ? CLIENT_STORAGE_MEMORY : setting.trim() )
// Return the right value or the default name
.getOrDefault( CLIENT_STORAGE_MEMORY );
// @formatter:on

// Now we can get the right cache name to use
Key clientCacheName = clientStorageName.equals( CLIENT_STORAGE_MEMORY )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void testGetClientVariablesList() {
// @formatter:off
runtime.executeSource(
"""
application name="myApp-with-client-scope-on" clientManagement="true";
application name="myApp-with-client-scope-variables" clientManagement="true";
client.foo = "bar";
result = getClientVariablesList();
Expand Down

0 comments on commit e1f04d5

Please sign in to comment.