KEYCLOAK-4723
Refactor service dependencies for caches in KeycloakServerDeploymentProcessor
This commit is contained in:
parent
a2af516df7
commit
0b6c9aa927
2 changed files with 6 additions and 17 deletions
2
pom.xml
2
pom.xml
|
@ -47,7 +47,7 @@
|
|||
<wildfly.build-tools.version>1.2.2.Final</wildfly.build-tools.version>
|
||||
<eap.version>7.1.0.Beta1-redhat-2</eap.version>
|
||||
<eap.build-tools.version>1.2.2.Final</eap.build-tools.version>
|
||||
<wildfly.core.version>2.0.10.Final</wildfly.core.version>
|
||||
<wildfly.core.version>3.0.0.Beta11</wildfly.core.version>
|
||||
|
||||
<version.org.wildfly.security.wildfly-elytron>1.1.0.Beta32</version.org.wildfly.security.wildfly-elytron>
|
||||
<version.org.wildfly.security.elytron-web.undertow-server>1.0.0.Beta14</version.org.wildfly.security.elytron-web.undertow-server>
|
||||
|
|
|
@ -96,22 +96,11 @@ public class KeycloakServerDeploymentProcessor implements DeploymentUnitProcesso
|
|||
}
|
||||
|
||||
private void addInfinispanCaches(DeploymentPhaseContext context) {
|
||||
// TODO Can be removed once we upgrade to WildFly 11
|
||||
ServiceName wf10CacheContainerService = ServiceName.of("jboss", "infinispan", "keycloak");
|
||||
boolean legacy = context.getServiceRegistry().getService(wf10CacheContainerService) != null;
|
||||
|
||||
if (!legacy) {
|
||||
ServiceTarget st = context.getServiceTarget();
|
||||
CapabilityServiceSupport support = context.getDeploymentUnit().getAttachment(Attachments.CAPABILITY_SERVICE_SUPPORT);
|
||||
for (String c : CACHES) {
|
||||
ServiceName sn = support.getCapabilityServiceName("org.wildfly.clustering.infinispan.cache.keycloak." + c);
|
||||
st.addDependency(sn);
|
||||
}
|
||||
} else {
|
||||
ServiceTarget st = context.getServiceTarget();
|
||||
for (String c : CACHES) {
|
||||
st.addDependency(wf10CacheContainerService.append(c));
|
||||
}
|
||||
ServiceTarget st = context.getServiceTarget();
|
||||
CapabilityServiceSupport support = context.getDeploymentUnit().getAttachment(Attachments.CAPABILITY_SERVICE_SUPPORT);
|
||||
for (String c : CACHES) {
|
||||
ServiceName sn = support.getCapabilityServiceName("org.wildfly.clustering.infinispan.cache", "keycloak", c);
|
||||
st.addDependency(sn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue