Changeset 29777
- Timestamp:
- 01/30/08 14:41:06 (10 months ago)
- Files:
-
- nuxeo-ep/trunk/jboss-patch/pom.xml (modified) (5 diffs)
- nuxeo-ep/trunk/jboss-patch/src/main/xsl/ds.xsl (modified) (2 diffs)
- nuxeo-ep/trunk/jboss-patch/src/main/xsl/jboss-service.xsl (modified) (9 diffs)
- nuxeo-ep/trunk/jboss-patch/src/main/xsl/standardjboss.xsl (modified) (1 diff)
- nuxeo-ep/trunk/jboss-patch/src/main/xsl/web-app.xsl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nuxeo-ep/trunk/jboss-patch/pom.xml
r29740 r29777 23 23 <jboss.conf>${jboss.server}/conf</jboss.conf> 24 24 <jboss.deploy>${jboss.server}/deploy</jboss.deploy> 25 <nuxeo.protocol>jrmp</nuxeo.protocol> 26 <nuxeo.hostname>www.nuxeo.org</nuxeo.hostname> 27 <nuxeo.port>8080</nuxeo.port> 25 28 </properties> 26 29 … … 59 62 </includes> 60 63 <stylesheet>src/main/xsl/jboss-service.xsl</stylesheet> 61 </transformationSet> 64 <parameters> 65 <parameter> 66 <name>locator</name> 67 <value>servlet</value> 68 </parameter> 69 <parameter> 70 <name>protocol</name> 71 <value>${nuxeo.protocol}</value> 72 </parameter> 73 <parameter> 74 <name>hostname</name> 75 <value>${nuxeo.hostname}</value> 76 </parameter> 77 <parameter> 78 <name>port</name> 79 <value>${nuxeo.port}</value> 80 </parameter> 81 </parameters> 82 </transformationSet> 62 83 <transformationSet> 63 84 <dir>${jboss.server}</dir> … … 66 87 </includes> 67 88 <stylesheet>src/main/xsl/standardjboss.xsl</stylesheet> 89 <parameters> 90 <parameter> 91 <name>protocol</name> 92 <value>${nuxeo.protocol}</value> 93 </parameter> 94 </parameters> 68 95 </transformationSet> 69 96 <transformationSet> … … 73 100 </includes> 74 101 <stylesheet>src/main/xsl/web-app.xsl</stylesheet> 102 <parameters> 103 <parameter> 104 <name>locator</name> 105 <value>servlet</value> 106 </parameter> 107 <parameter> 108 <name>protocol</name> 109 <value>${nuxeo.protocol}</value> 110 </parameter> 111 <parameter> 112 <name>hostname</name> 113 <value>${nuxeo.hostname}</value> 114 </parameter> 115 <parameter> 116 <name>port</name> 117 <value>${nuxeo.port}</value> 118 </parameter> 119 </parameters> 75 120 </transformationSet> 76 121 <transformationSet> … … 80 125 </includes> 81 126 <stylesheet>src/main/xsl/ds.xsl</stylesheet> 127 <parameters> 128 <parameter> 129 <name>protocol</name> 130 <value>${nuxeo.protocol}</value> 131 </parameter> 132 </parameters> 82 133 </transformationSet> 83 134 </transformationSets> nuxeo-ep/trunk/jboss-patch/src/main/xsl/ds.xsl
r29715 r29777 1 1 <xsl:stylesheet version="1.0" 2 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 3 <xsl:param name="protocol" select="jrmp"/> 4 4 5 5 <!-- copy with attributes, and keep comments --> 6 6 <xsl:template match="@*|node()|comment()"> 7 <xsl:copy> 8 <xsl:choose> 9 <xsl:when test="$protocol='http'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 10 <xsl:when test="$protocol='https'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 11 <xsl:otherwise><xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/></xsl:otherwise> 12 </xsl:choose> 13 </xsl:copy> 14 </xsl:template> 15 16 <xsl:template match="@*|node()|comment()" mode="jrmp"> 17 <!-- This template leaves source XML almost intact --> 7 18 <xsl:copy> 8 <xsl:apply-templates select="@*|node()|comment()" />19 <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 9 20 </xsl:copy> 10 21 </xsl:template> 11 22 23 <xsl:template match="@*|node()|comment()" mode="http"> 24 <!-- This template leaves source XML almost intact --> 25 <xsl:copy> 26 <xsl:apply-templates select="@*|node()|comment()" mode="http"/> 27 </xsl:copy> 28 </xsl:template> 12 29 13 30 <!-- Removing previous invoker specification --> 14 <xsl:template match="local-tx-datasource/jmx-invoker-name"> 31 <xsl:template match="local-tx-datasource/jmx-invoker-name" mode="http"> 32 <xsl:comment>Nuxeo patch: previous invoker specification removed</xsl:comment> 33 </xsl:template> 34 <xsl:template match="local-tx-datasource/jmx-invoker-name" mode="jrmp"> 15 35 <xsl:comment>Nuxeo patch: previous invoker specification removed</xsl:comment> 16 36 </xsl:template> 17 37 18 38 <!-- Adding JMX invoker specification --> 19 <xsl:template match="local-tx-datasource/jndi-name" >39 <xsl:template match="local-tx-datasource/jndi-name" mode="http"> 20 40 <xsl:copy> 21 41 <xsl:apply-templates select="@*|node()"/> … … 26 46 27 47 <!-- Removing previous invoker specification --> 28 <xsl:template match="xa-datasource/jmx-invoker-name"> 48 <xsl:template match="xa-datasource/jmx-invoker-name" mode="jrmp"> 49 <xsl:comment>Nuxeo patch: previous invoker specification removed</xsl:comment> 50 </xsl:template> 51 52 <xsl:template match="xa-datasource/jmx-invoker-name" mode="http"> 29 53 <xsl:comment>Nuxeo patch: previous invoker specification removed</xsl:comment> 30 54 </xsl:template> 31 55 32 56 <!-- Adding JMX invoker specification --> 33 <xsl:template match="xa-datasource/jndi-name" >57 <xsl:template match="xa-datasource/jndi-name" mode="http"> 34 58 <xsl:copy> 35 59 <xsl:apply-templates select="@*|node()"/> nuxeo-ep/trunk/jboss-patch/src/main/xsl/jboss-service.xsl
r29740 r29777 2 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 3 4 <xsl:param name="protocol" select="jrmp"/> 5 <xsl:param name="locator" select="servlet"/> 6 <xsl:param name="hostname" select="www.nuxeo.org"/> 7 <xsl:param name="port" select="8080"/> 4 8 5 9 <!-- copy with attributes, and keep comments --> 6 10 <xsl:template match="@*|node()|comment()"> 11 <xsl:copy> 12 <xsl:choose> 13 <xsl:when test="$protocol='http'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 14 <xsl:when test="$protocol='https'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 15 <xsl:otherwise><xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/></xsl:otherwise> 16 </xsl:choose> 17 </xsl:copy> 18 </xsl:template> 19 20 <xsl:template match="@*|node()|comment()" mode="jrmp"> 21 <!-- This template leaves source XML almost intact --> 7 22 <xsl:copy> 8 <xsl:apply-templates select="@*|node()|comment()" />23 <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 9 24 </xsl:copy> 10 25 </xsl:template> 26 <!-- Making sure EAR deployer switches to NuxeoDeployer, the rest is left intact --> 27 <xsl:template match="mbean[@name='jboss.j2ee:service=EARDeployer']" mode="jrmp"> 28 <xsl:comment>Nuxeo patch: mbean[jboss.j2ee:service=EARDeployer]: changing 'code' attribute to 'org.nuxeo.runtime.jboss.deployment.NuxeoDeployer'</xsl:comment><xsl:text> 29 </xsl:text><mbean code="org.nuxeo.runtime.jboss.deployment.NuxeoDeployer" name="jboss.j2ee:service=EARDeployer"><xsl:text> 30 </xsl:text><xsl:comment><xsl:text> A flag indicating if ear deployments should have their own scoped 31 class loader to isolate their classes from other deployments. 32 </xsl:text></xsl:comment><xsl:text> 33 </xsl:text><attribute name="Isolated">false</attribute><xsl:text> 34 </xsl:text><xsl:comment><xsl:text>A flag indicating if the ear components should have in VM call 35 optimization disabled. 36 </xsl:text></xsl:comment><xsl:text> 37 </xsl:text><attribute name="CallByValue">false</attribute><xsl:text> 38 </xsl:text><xsl:comment><xsl:text> NXJBossExtensions: A flag indicating that the preprocessor 39 must always run before deploying the EAR. 40 On live systems you may want to avoid running the preprocessor 41 each time, and run it manually after modifying the EAR 42 either from the JMX console or by deleting the file 43 ".predeploy" and restarting JBoss. 44 </xsl:text></xsl:comment><xsl:text> 45 </xsl:text><attribute name="Debug">true</attribute><xsl:text> 46 </xsl:text></mbean> 47 </xsl:template> 48 49 50 <xsl:template match="@*|node()|comment()" mode="http"> 51 <xsl:copy> 52 <xsl:apply-templates select="@*|node()|comment()" mode="http"/> 53 </xsl:copy> 54 </xsl:template> 11 55 12 56 13 57 <!-- Removing JRMP invoker --> 14 <xsl:template match="mbean[@name='jboss:service=invoker,type=jrmp']" >58 <xsl:template match="mbean[@name='jboss:service=invoker,type=jrmp']" mode="http"> 15 59 <xsl:comment>Nuxeo patch: mbean[jboss:service=invoker,type=jrmp] removed</xsl:comment> 16 60 </xsl:template> 17 61 18 62 <!-- Removing Pooled invoker --> 19 <xsl:template match="mbean[@name='jboss:service=invoker,type=pooled']" >63 <xsl:template match="mbean[@name='jboss:service=invoker,type=pooled']" mode="http"> 20 64 <xsl:comment>Nuxeo patch: mbean[jboss:service=invoker,type=pooled] removed</xsl:comment> 21 65 </xsl:template> 22 66 23 67 <!-- Removing UIL2 invoker --> 24 <xsl:template match="mbean[@name='jboss.mq:service=InvocationLayer,type=UIL2']" >68 <xsl:template match="mbean[@name='jboss.mq:service=InvocationLayer,type=UIL2']" mode="http"> 25 69 <xsl:comment>Nuxeo patch: mbean[jboss.mq:service=InvocationLayer,type=UIL2] removed</xsl:comment> 26 70 </xsl:template> 27 <!-- The RMI for NamingService should be bound to localhost for security reasons-->28 <xsl:template match="mbean[@name='jboss.mq:service=InvocationLayer,type=HTTP']/attribute[@name='ConnectionFactoryJNDIRef']" >71 <!-- HTTP UIL factories get rid of HTTP prefix --> 72 <xsl:template match="mbean[@name='jboss.mq:service=InvocationLayer,type=HTTP']/attribute[@name='ConnectionFactoryJNDIRef']" mode="http"> 29 73 <xsl:comment>Nuxeo patch: mbean[jboss.mq:service=InvocationLayer,type=HTTP] change connection factory</xsl:comment><xsl:text> 30 74 </xsl:text><attribute name='ConnectionFactoryJNDIRef'>ConnectionFactory</attribute> 31 75 </xsl:template> 32 <xsl:template match="mbean[@name='jboss.mq:service=InvocationLayer,type=HTTP']/attribute[@name='XAConnectionFactoryJNDIRef']" >76 <xsl:template match="mbean[@name='jboss.mq:service=InvocationLayer,type=HTTP']/attribute[@name='XAConnectionFactoryJNDIRef']" mode="http"> 33 77 <xsl:comment>Nuxeo patch: mbean[jboss.mq:service=InvocationLayer,type=HTTP] change connection factory</xsl:comment><xsl:text> 34 78 </xsl:text><attribute name='XAConnectionFactoryJNDIRef'>XAConnectionFactory</attribute> … … 36 80 37 81 <!-- Replacing socket locator dependency for unified invoker with SSLServlet transport (JBoss 4.2) --> 38 <xsl:template match="mbean[@name='jboss:service=invoker,type=unified']/depends[text()='jboss.remoting:service=Connector,transport=socket']"> 39 <xsl:comment>Nuxeo patch: Replacing socket locator dependency for unified invoker with SSLServlet transport</xsl:comment><xsl:text> 40 </xsl:text><depends>jboss.remoting:service=Connector,transport=SSLServlet</depends> 41 </xsl:template> 82 <xsl:template match="mbean[@name='jboss:service=invoker,type=unified']/depends[text()='jboss.remoting:service=Connector,transport=socket']" mode="http"> 83 <xsl:comment>Nuxeo patch: Replacing socket locator dependency for unified invoker with Servlet transport</xsl:comment><xsl:text> 84 </xsl:text><depends>jboss.remoting:service=Connector,transport=Servlet</depends> 85 </xsl:template> 86 <!-- Replacing socket locator for unified invoker with SSLServlet transport (JBoss 4.2) --> 87 <xsl:template match="mbean[@name='jboss.remoting:service=Connector,transport=socket']" mode="http"> 88 <xsl:comment>Nuxeo patch: mbean[jboss.remoting:service=Connector,transport=socket] replaced</xsl:comment><xsl:text> 89 </xsl:text><mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=Connector,transport=Servlet" display-name="SSL Servlet transport Connector"><xsl:text> 90 </xsl:text><attribute name="InvokerLocator"><xsl:value-of select="concat($locator,'://',$hostname,':',$port)"/>/invoker/ServerInvokerServlet</attribute><xsl:text> 91 </xsl:text><attribute name="Configuration"><xsl:text> 92 </xsl:text><config><xsl:text> 93 </xsl:text><handlers><xsl:text> 94 </xsl:text><handler subsystem="invoker">jboss:service=invoker,type=unified</handler><xsl:text> 95 </xsl:text></handlers><xsl:text> 96 </xsl:text></config><xsl:text> 97 </xsl:text></attribute><xsl:text> 98 </xsl:text><depends>jboss.remoting:service=NetworkRegistry</depends><xsl:text> 99 </xsl:text></mbean> 100 </xsl:template> 101 42 102 43 103 <!-- Getting rid of WebService mbean and its dependencies … … 50 110 51 111 <!-- Replacing JRMP JMX invoker with HTTP invoker --> 52 <xsl:template match="mbean[@name='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory']" >112 <xsl:template match="mbean[@name='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory']" mode="http"> 53 113 <xsl:comment>Nuxeo patch: mbean[jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory] replaced</xsl:comment><xsl:text> 54 114 </xsl:text><mbean code="org.jboss.invocation.http.server.HttpProxyFactory" name="jboss.jmx:type=adaptor,name=Invoker,protocol=http,service=proxyFactory"><xsl:text> 55 </xsl:text><attribute name="InvokerURL"> http://${jboss.bind.address}/invoker/JMXInvokerServlet</attribute><xsl:text>115 </xsl:text><attribute name="InvokerURL"><xsl:value-of select="concat($protocol,'://',$hostname,':',$port)"/>/invoker/JMXInvokerServlet</attribute><xsl:text> 56 116 </xsl:text><depends optional-attribute-name="InvokerName">jboss.jmx:type=adaptor,name=Invoker</depends><xsl:text> 57 117 </xsl:text><depends>jboss:service=invoker,type=http</depends><xsl:text> … … 73 133 74 134 <!-- Replacing proxy dependency for Plugin manager --> 75 <xsl:template match="mbean[@name='jboss.admin:service=PluginManager']/depends[text()='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory']" >135 <xsl:template match="mbean[@name='jboss.admin:service=PluginManager']/depends[text()='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory']" mode="http"> 76 136 <xsl:comment>Nuxeo patch: Replacing proxy dependency for mbean[jboss.admin:service=PluginManager]</xsl:comment><xsl:text> 77 137 </xsl:text><depends>jboss.jmx:type=adaptor,name=Invoker,protocol=http,service=proxyFactory</depends><xsl:text> … … 79 139 </xsl:template> 80 140 81 <xsl:template match="mbean[(@name!='jboss.admin:service=PluginManager')and(count(depends[text()='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory'])>0)]" >141 <xsl:template match="mbean[(@name!='jboss.admin:service=PluginManager')and(count(depends[text()='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory'])>0)]" mode="http"> 82 142 <xsl:comment>Nuxeo patch: mbean[<xsl:value-of select="@name"/>] removed as dependent on mbean[jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory]</xsl:comment> 83 143 </xsl:template> 84 144 85 <xsl:template match="mbean[@name='jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=http']" >145 <xsl:template match="mbean[@name='jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=http']" mode="http"> 86 146 <xsl:comment>Nuxeo patch: mbean[jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=http] removed</xsl:comment> 87 147 </xsl:template> 88 <xsl:template match="mbean[@name='jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp']" >148 <xsl:template match="mbean[@name='jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp']" mode="http"> 89 149 <xsl:comment>Nuxeo patch: mbean[jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp] removed</xsl:comment> 90 150 </xsl:template> 91 <xsl:template match="mbean[@name='jboss.jmx:alias=jmx/rmi/RMIAdaptor']" >151 <xsl:template match="mbean[@name='jboss.jmx:alias=jmx/rmi/RMIAdaptor']" mode="http"> 92 152 <xsl:comment>Nuxeo patch: added naming aliases to the Http Proxy</xsl:comment><xsl:text> 93 153 </xsl:text><mbean code="org.jboss.naming.NamingAlias" name="jboss.jmx:alias=jmx/invoker/RMIAdaptor"><xsl:text> … … 103 163 </xsl:text></mbean> 104 164 </xsl:template> 105 <xsl:template match="mbean[@name='jboss.jmx:alias=jmx/invoker/RMIAdaptor']" >165 <xsl:template match="mbean[@name='jboss.jmx:alias=jmx/invoker/RMIAdaptor']" mode="http"> 106 166 <xsl:comment>Nuxeo patch: mbean[jboss.jmx:alias=jmx/invoker/RMIAdaptor] removed</xsl:comment> 107 167 </xsl:template> 108 168 109 <!-- Replacing socket locator for unified invoker with SSLServlet transport (JBoss 4.2) -->110 <xsl:template match="mbean[@name='jboss.remoting:service=Connector,transport=socket']">111 <xsl:comment>Nuxeo patch: mbean[jboss.remoting:service=Connector,transport=socket] replaced</xsl:comment><xsl:text>112 </xsl:text><mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=Connector,transport=SSLServlet" display-name="SSL Servlet transport Connector"><xsl:text>113 </xsl:text><attribute name="InvokerLocator">servlet://${jboss.bind.address}/invoker/ServerInvokerServlet</attribute><xsl:text>114 </xsl:text><attribute name="Configuration"><xsl:text>115 </xsl:text><config><xsl:text>116 </xsl:text><handlers><xsl:text>117 </xsl:text><handler subsystem="invoker">jboss:service=invoker,type=unified</handler><xsl:text>118 </xsl:text></handlers><xsl:text>119 </xsl:text></config><xsl:text>120 </xsl:text></attribute><xsl:text>121 </xsl:text><depends>jboss.remoting:service=NetworkRegistry</depends><xsl:text>122 </xsl:text></mbean>123 </xsl:template>124 125 169 <!-- Replacing ClientUserTransaction as depending on JRMP invoker --> 126 <xsl:template match="mbean[@name='jboss:service=ClientUserTransaction']" >170 <xsl:template match="mbean[@name='jboss:service=ClientUserTransaction']" mode="http"> 127 171 <xsl:comment>Nuxeo patch: mbean[jboss:service=ClientUserTransaction] now depends on HTTP Proxy</xsl:comment><xsl:text> 128 172 </xsl:text><mbean code="org.jboss.tm.usertx.server.ClientUserTransactionService" name="jboss:service=ClientUserTransaction" xmbean-dd="resource:xmdesc/ClientUserTransaction-xmbean.xml"><xsl:text> … … 159 203 160 204 <!-- Disabling listening Port for NamingService --> 161 <xsl:template match="mbean[@name='jboss:service=Naming']/attribute[@name='Port']" >205 <xsl:template match="mbean[@name='jboss:service=Naming']/attribute[@name='Port']" mode="http"> 162 206 <xsl:comment>Nuxeo patch: mbean[jboss:service=Naming] now does not listen to JNP port</xsl:comment><xsl:text> 163 207 </xsl:text><attribute name='Port'>-1</attribute> 164 208 </xsl:template> 165 209 <!-- The RMI for NamingService should be bound to localhost for security reasons --> 166 <xsl:template match="mbean[@name='jboss:service=Naming']/attribute[@name='RmiBindAddress']" >210 <xsl:template match="mbean[@name='jboss:service=Naming']/attribute[@name='RmiBindAddress']" mode="http"> 167 211 <xsl:comment>Nuxeo patch: mbean[jboss:service=Naming] now does not bind to network</xsl:comment><xsl:text> 168 212 </xsl:text><attribute name='RmiBindAddress'>localhost</attribute> … … 170 214 171 215 <!-- We remove attribute[InvokerURLPrefix] as redundant --> 172 <xsl:template match="mbean/attribute[@name='InvokerURLPrefix']" >216 <xsl:template match="mbean/attribute[@name='InvokerURLPrefix']" mode="http"> 173 217 <xsl:comment>Nuxeo patch: removing attribute[InvokerURLPrefix]</xsl:comment> 174 218 </xsl:template> 175 219 176 220 <!-- We remove attribute[InvokerURLPrefix] as evil --> 177 <xsl:template match="mbean/attribute[@name='UseHostName']" >221 <xsl:template match="mbean/attribute[@name='UseHostName']" mode="http"> 178 222 <xsl:comment>Nuxeo patch: removing attribute[UseHostName]</xsl:comment> 179 223 </xsl:template> 180 224 181 225 <!-- We replace attribute[InvokerURLSuffix] and attribute[InvokerURL] with proper attribute[InvokerURL] --> 182 <xsl:template match="mbean/attribute[@name='InvokerURLSuffix']" >226 <xsl:template match="mbean/attribute[@name='InvokerURLSuffix']" mode="http"> 183 227 <xsl:comment>Nuxeo patch: replacing attribute[InvokerURLSuffix]</xsl:comment><xsl:text> 184 </xsl:text><attribute name="InvokerURL"><xsl:value-of select="concat( 'http://${jboss.bind.address}/invoker/',substring-after(text(),'/invoker/'))"/></attribute>228 </xsl:text><attribute name="InvokerURL"><xsl:value-of select="concat($protocol,'://',$hostname,':',$port,'/invoker/',substring-after(text(),'/invoker/'))"/></attribute> 185 229 </xsl:template> 186 230 187 231 <!-- We replace attribute[InvokerURLSuffix] and attribute[InvokerURL] with proper attribute[InvokerURL] --> 188 <xsl:template match="mbean/attribute[@name='InvokerURL']" >232 <xsl:template match="mbean/attribute[@name='InvokerURL']" mode="http"> 189 233 <xsl:comment>Nuxeo patch: replacing attribute[InvokerURL]</xsl:comment><xsl:text> 190 </xsl:text><attribute name="InvokerURL"><xsl:value-of select="concat( 'http://${jboss.bind.address}/invoker/',substring-after(text(),'/invoker/'))"/></attribute>234 </xsl:text><attribute name="InvokerURL"><xsl:value-of select="concat($protocol,'://',$hostname,':',$port,'/invoker/',substring-after(text(),'/invoker/'))"/></attribute> 191 235 </xsl:template> 192 236 193 237 194 238 <!-- Making sure EAR deployer depends on HTTPS invoker --> 195 <xsl:template match="mbean[@name='jboss.j2ee:service=EARDeployer']" >239 <xsl:template match="mbean[@name='jboss.j2ee:service=EARDeployer']" mode="http"> 196 240 <xsl:comment>Nuxeo patch: mbean[jboss.j2ee:service=EARDeployer]: removing redundant attribute</xsl:comment><xsl:text> 197 241 </xsl:text><mbean code="org.nuxeo.runtime.jboss.deployment.NuxeoDeployer" name="jboss.j2ee:service=EARDeployer"><xsl:text> … … 212 256 </xsl:text></xsl:comment><xsl:text> 213 257 </xsl:text><attribute name="Debug">true</attribute><xsl:text> 258 </xsl:text><depends>jboss:service=invoker,type=http</depends><xsl:text> 214 259 </xsl:text></mbean> 215 260 </xsl:template> 216 261 217 262 <!-- Updating EJB3 connector --> 218 <xsl:template match="mbean[@name='jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3']/attribute[@name='InvokerLocator']" >263 <xsl:template match="mbean[@name='jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3']/attribute[@name='InvokerLocator']" mode="http"> 219 264 <xsl:comment>Nuxeo patch: mbean[jboss.j2ee:service=EARDeployer] now depends on HTTP invoker</xsl:comment><xsl:text> 220 265 </xsl:text><depends>jboss:service=invoker,type=http</depends><xsl:text> 221 </xsl:text><attribute name="InvokerLocator"> servlet://${jboss.bind.address}/invoker/Ejb3InvokerServlet</attribute>266 </xsl:text><attribute name="InvokerLocator"><xsl:value-of select="concat($locator,'://',$hostname,':',$port)"/>/invoker/Ejb3InvokerServlet</attribute> 222 267 </xsl:template> 223 268 nuxeo-ep/trunk/jboss-patch/src/main/xsl/standardjboss.xsl
r29715 r29777 2 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 3 4 <xsl:param name="protocol" select="jrmp"/> 4 5 5 6 <!-- copy with attributes, and keep comments --> 6 7 <xsl:template match="@*|node()|comment()"> 8 <xsl:copy> 9 <xsl:choose> 10 <xsl:when test="$protocol='http'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 11 <xsl:when test="$protocol='https'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 12 <xsl:otherwise><xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/></xsl:otherwise> 13 </xsl:choose> 14 </xsl:copy> 15 </xsl:template> 16 17 <xsl:template match="@*|node()|comment()" mode="jrmp"> 18 <!-- This template leaves source XML almost intact --> 7 19 <xsl:copy> 8 <xsl:apply-templates select="@*|node()|comment()" />20 <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 9 21 </xsl:copy> 10 22 </xsl:template> 11 23 24 12 25 <!-- Dirty patch --> 13 <xsl:template match="invoker-proxy-binding/name[contains(text(),'-rmi-')]" >26 <xsl:template match="invoker-proxy-binding/name[contains(text(),'-rmi-')]" mode="http"> 14 27 <xsl:comment>Nuxeo patch: invoker proxy binding renamed</xsl:comment><xsl:text> 15 28 </xsl:text><name><xsl:value-of select="concat(substring-before(text(),'-rmi-'), '-http-',substring-after(text(),'-rmi-'))"/></name> 16 29 </xsl:template> 17 <xsl:template match="invoker-proxy-binding/invoker-mbean[contains(text(),'jrmp')]" >30 <xsl:template match="invoker-proxy-binding/invoker-mbean[contains(text(),'jrmp')]" mode="http"> 18 31 <xsl:comment>Nuxeo patch: invoker proxy binding renamed</xsl:comment><xsl:text> 19 32 </xsl:text><invoker-mbean><xsl:value-of select="concat(substring-before(text(),'jrmp'), 'http',substring-after(text(),'jrmp'))"/></invoker-mbean> 20 33 </xsl:template> 21 34 22 <xsl:template match="invoker-proxy-binding-name[contains(text(),'-rmi-')]" >35 <xsl:template match="invoker-proxy-binding-name[contains(text(),'-rmi-')]" mode="http"> 23 36 <xsl:comment>Nuxeo patch: invoker proxy binding renamed</xsl:comment><xsl:text> 24 37 </xsl:text><invoker-proxy-binding-name><xsl:value-of select="concat(substring-before(text(),'-rmi-'), '-http-',substring-after(text(),'-rmi-'))"/></invoker-proxy-binding-name> nuxeo-ep/trunk/jboss-patch/src/main/xsl/web-app.xsl
r29715 r29777 2 2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 3 4 <xsl:param name="protocol" select="jrmp"/> 5 <xsl:param name="locator" select="servlet"/> 6 <xsl:param name="hostname" select="www.nuxeo.org"/> 7 <xsl:param name="port" select="8080"/> 4 8 5 9 <!-- copy with attributes, and keep comments --> 6 10 <xsl:template match="@*|node()|comment()"> 11 <xsl:copy> 12 <xsl:choose> 13 <xsl:when test="$protocol='http'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 14 <xsl:when test="$protocol='https'"><xsl:apply-templates select="@*|node()|comment()" mode="http"/></xsl:when> 15 <xsl:otherwise><xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/></xsl:otherwise> 16 </xsl:choose> 17 </xsl:copy> 18 </xsl:template> 19 20 <xsl:template match="@*|node()|comment()" mode="jrmp"> 21 <!-- This template leaves source XML intact --> 7 22 <xsl:copy> 8 <xsl:apply-templates select="@*|node()|comment()"/> 23 <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 24 </xsl:copy> 25 </xsl:template> 26 27 <xsl:template match="@*|node()|comment()" mode="http"> 28 <!-- This template leaves source XML intact with exceptions below --> 29 <xsl:copy> 30 <xsl:apply-templates select="@*|node()|comment()" mode="http"/> 9 31 </xsl:copy> 10 32 </xsl:template> 11 33 12 34 <!-- Removing old EJB3 connector servlets --> 13 <xsl:template match="web-app/servlet[servlet-name/text()='ServerInvokerServlet']" >35 <xsl:template match="web-app/servlet[servlet-name/text()='ServerInvokerServlet']" mode="jrmp"> 14 36 <xsl:comment>Nuxeo patch: removing servlet[ServerInvokerServlet]</xsl:comment> 15 37 </xsl:template> 16 <xsl:template match="web-app/servlet[servlet-name/text()='Ejb3InvokerServlet']" >38 <xsl:template match="web-app/servlet[servlet-name/text()='Ejb3InvokerServlet']" mode="jrmp"> 17 39 <xsl:comment>Nuxeo patch: removing servlet[Ejb3InvokerServlet]</xsl:comment> 18 40 </xsl:template> 19 <xsl:template match="web-app/servlet-mapping[servlet-name/text()='ServerInvokerServlet']" >41 <xsl:template match="web-app/servlet-mapping[servlet-name/text()='ServerInvokerServlet']" mode="jrmp"> 20 42 <xsl:comment>Nuxeo patch: removing servlet-mapping[ServerInvokerServlet]</xsl:comment> 21 43 </xsl:template> 22 <xsl:template match="web-app/servlet-mapping[servlet-name/text()='Ejb3InvokerServlet']"> 44 <xsl:template match="web-app/servlet-mapping[servlet-name/text()='Ejb3InvokerServlet']" mode="jrmp"> 45 <xsl:comment>Nuxeo patch: removing servlet-mapping[Ejb3InvokerServlet]</xsl:comment> 46 </xsl:template> 47 <!-- Removing old EJB3 connector servlets --> 48 <xsl:template match="web-app/servlet[servlet-name/text()='ServerInvokerServlet']" mode="http"> 49 <xsl:comment>Nuxeo patch: removing servlet[ServerInvokerServlet]</xsl:comment> 50 </xsl:template> 51 <xsl:template match="web-app/servlet[servlet-name/text()='Ejb3InvokerServlet']" mode="http"> 52 <xsl:comment>Nuxeo patch: removing servlet[Ejb3InvokerServlet]</xsl:comment> 53 </xsl:template> 54 <xsl:template match="web-app/servlet-mapping[servlet-name/text()='ServerInvokerServlet']" mode="http"> 55 <xsl:comment>Nuxeo patch: removing servlet-mapping[ServerInvokerServlet]</xsl:comment> 56 </xsl:template> 57 <xsl:template match="web-app/servlet-mapping[servlet-name/text()='Ejb3InvokerServlet']" mode="http"> 23 58 <xsl:comment>Nuxeo patch: removing servlet-mapping[Ejb3InvokerServlet]</xsl:comment> 24 59 </xsl:template> 25 60 26 61 <!-- Updating EJB3 connector servlets --> 27 <xsl:template match="web-app/servlet[1]" >62 <xsl:template match="web-app/servlet[1]" mode="http"> 28 63 <xsl:copy> 29 64 <xsl:apply-templates select="@*|node()|comment()"/> … … 39 74 </xsl:text><init-param><xsl:text> 40 75 </xsl:text><param-name>locatorUrl</param-name><xsl:text> 41 </xsl:text><param-value> servlet://${jboss.bind.address}/invoker/ServerInvokerServlet</param-value><xsl:text>76 </xsl:text><param-value><xsl:value-of select="concat($locator,'://',$hostname,':',$port)"/>/invoker/ServerInvokerServlet</param-value><xsl:text> 42 77 </xsl:text><description>The servlet server invoker locator url</description><xsl:text> 43 78 </xsl:text></init-param><xsl:text> … … 53 88 </xsl:text><init-param><xsl:text> 54 89 </xsl:text><param-name>locatorUrl</param-name><xsl:text> 55 </xsl:text><param-value> servlet://${jboss.bind.address}/invoker/Ejb3InvokerServlet</param-value><xsl:text>90 </xsl:text><param-value><xsl:value-of select="concat($locator,'://',$hostname,':',$port)"/>/invoker/Ejb3InvokerServlet</param-value><xsl:text> 56 91 </xsl:text><description>The servlet server invoker locator url</description><xsl:text> 57 92 </xsl:text></init-param><xsl:text> … … 61 96 62 97 <!-- Updating EJB3 connector servlets --> 63 <xsl:template match="web-app/servlet-mapping[1]" >98 <xsl:template match="web-app/servlet-mapping[1]" mode="http"> 64 99 <xsl:copy> 65 100 <xsl:apply-templates select="@*|node()|comment()"/>
