1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <xsl : stylesheet version =" 2.0"
4+ xmlns : xsl =" http://www.w3.org/1999/XSL/Transform"
5+ xmlns : xalan =" http://xml.apache.org/xalan"
6+ xmlns : ds =" urn:jboss:domain:datasources:3.0"
7+ xmlns : logging =" urn:jboss:domain:logging:3.0"
8+ xmlns : ispn =" urn:jboss:domain:infinispan:3.0"
9+ xmlns : mcluster =" urn:jboss:domain:modcluster:2.0"
10+ xmlns : server =" urn:jboss:domain:3.0"
11+ exclude-result-prefixes =' ds logging ispn mcluster xalan server'
12+ >
13+
14+ <xsl : output method =" xml" indent =" yes" xalan : indent-amount =" 4" standalone =" no" />
15+ <xsl : strip-space elements =" *" />
16+
17+ <xsl : template match =" //ds:subsystem/ds:datasources/ds:datasource[@jndi-name='java:jboss/datasources/KeycloakDS']" >
18+ <ds : datasource jndi-name =" java:jboss/datasources/KeycloakDS" pool-name =" KeycloakDS" enabled =" true" use-java-context =" true" >
19+ <ds : connection-url >jdbc:mysql://${mysql.host}/keycloak_db</ds : connection-url >
20+ <ds : driver >mysql</ds : driver >
21+ <ds : security >
22+ <ds : user-name >root</ds : user-name >
23+ <ds : password >mysecretpassword</ds : password >
24+ </ds : security >
25+ </ds : datasource >
26+ </xsl : template >
27+
28+ <xsl : template match =" //ds:subsystem/ds:datasources/ds:drivers" >
29+ <xsl : copy >
30+ <xsl : apply-templates select =" @*|node()" />
31+ <ds : driver name =" mysql" module =" com.mysql" >
32+ <ds : xa-datasource-class >com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</ds : xa-datasource-class >
33+ </ds : driver >
34+ </xsl : copy >
35+ </xsl : template >
36+
37+ <xsl : template match =" //logging:subsystem/logging:periodic-rotating-file-handler" >
38+ <xsl : copy >
39+ <xsl : apply-templates select =" @*|node()" />
40+ </xsl : copy >
41+ <logging : logger category =" org.keycloak" >
42+ <logging : level name =" DEBUG" />
43+ </logging : logger >
44+ <logging : logger category =" org.jboss.resteasy.core.ResourceLocator" >
45+ <logging : level name =" ERROR" />
46+ </logging : logger >
47+ </xsl : template >
48+
49+ <xsl : template match =" //ispn:subsystem/ispn:cache-container[@name='keycloak']" >
50+ <ispn : cache-container name =" keycloak" jndi-name =" infinispan/Keycloak" >
51+ <ispn : transport lock-timeout =" 60000" />
52+ <ispn : invalidation-cache name =" realms" mode =" SYNC" />
53+ <ispn : invalidation-cache name =" users" mode =" SYNC" />
54+ <ispn : distributed-cache name =" sessions" mode =" SYNC" owners =" 2" />
55+ <ispn : distributed-cache name =" loginFailures" mode =" SYNC" owners =" 2" />
56+ </ispn : cache-container >
57+ </xsl : template >
58+
59+ <xsl : template match =" //mcluster:subsystem/mcluster:mod-cluster-config" >
60+ <mcluster : mod-cluster-config advertise-socket =" modcluster" proxies =' myproxy' proxy-url =" /" balancer =" mycluster" advertise =" false" connector =" ajp" sticky-session =" true" >
61+ <mcluster : dynamic-load-provider >
62+ <mcluster : load-metric type =" cpu" />
63+ </mcluster : dynamic-load-provider >
64+ </mcluster : mod-cluster-config >
65+ </xsl : template >
66+
67+ <xsl : template match =" //server:socket-binding-group" >
68+ <xsl : copy >
69+ <xsl : apply-templates select =" @*|node()" />
70+ <server : outbound-socket-binding name =" myproxy" >
71+ <server : remote-destination host =" ${{httpd.proxyHost}}" port =" ${{httpd.proxyPort}}" />
72+ </server : outbound-socket-binding >
73+ </xsl : copy >
74+ </xsl : template >
75+
76+ <xsl : template match =" @*|node()" >
77+ <xsl : copy >
78+ <xsl : apply-templates select =" @*|node()" />
79+ </xsl : copy >
80+ </xsl : template >
81+
82+ </xsl : stylesheet >
0 commit comments