Richard Altmayer
08/20/2024, 12:27 PMclass TomcatClusterConfiguration implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {
@Override
void customize(TomcatServletWebServerFactory factory) {
factory.addContextCustomizers(new TomcatContextCustomizer() {
@Override
void customize(Context context) {
context.setDistributable(true)
Engine engine = ((Engine) context.getParent().getParent())
engine.setJvmRoute("node${factory.getPort()}")
context.setCluster(configureCluster())
}
})
}
For the Grails 2 application, we used the _Events.groovy approach:
// _Events.groovy
eventConfigureTomcat = { tomcat ->
TomcatClusterConfiguration.customize(tomcat)
}
Has anyone ever needed to do something like this? Is there another way to do this?James Fredley
08/20/2024, 12:47 PMjdaugherty
08/20/2024, 5:34 PMjdaugherty
08/20/2024, 5:35 PMJames Fredley
08/20/2024, 7:13 PMclass GoogleOAuth2SpringToken extends AbstractAuthenticationToken {
private static final long serialVersionUID = 111899
}