Skip to content

Commit

Permalink
Added refresh of factory, which effectively reads the config again
Browse files Browse the repository at this point in the history
Signed-off-by: Arjan Tijms <arjan.tijms@omnifish.ee>
  • Loading branch information
arjantijms committed Aug 15, 2023
1 parent 7770a46 commit b882b97
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

import jakarta.inject.Inject;
import jakarta.inject.Named;
import jakarta.security.auth.message.config.AuthConfigFactory;

/**
* Listener class to handle admin message-security-config element events.
Expand All @@ -54,7 +55,7 @@ public class MessageSecurityConfigEventListenerImpl implements ConfigListener {

@Inject
@Named(ServerEnvironment.DEFAULT_INSTANCE_NAME)
private SecurityService service;
private SecurityService service; // required to be injected to register MessageSecurityConfigEventListenerImpl as an listener

@Override
public UnprocessedChangeEvents changed(PropertyChangeEvent[] events) {
Expand Down Expand Up @@ -85,11 +86,11 @@ public <T extends ConfigBeanProxy> NotProcessed changed(TYPE type, Class<T> chan

private <T extends ConfigBeanProxy> NotProcessed handle(T instance) {
if (instance instanceof MessageSecurityConfig) {
// GFServerConfigProvider.loadConfigContext(service);
AuthConfigFactory.getFactory().refresh();
return null;
}

return new NotProcessed("unimplemented: unknown instance: " + instance.getClass().getName());
}


}

0 comments on commit b882b97

Please sign in to comment.