Changeset 29777

Show
Ignore:
Timestamp:
01/30/08 14:41:06 (10 months ago)
Author:
onazarov
Message:

jboss patch: http update is now optional

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nuxeo-ep/trunk/jboss-patch/pom.xml

    r29740 r29777  
    2323    <jboss.conf>${jboss.server}/conf</jboss.conf> 
    2424    <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> 
    2528  </properties> 
    2629 
     
    5962                  </includes> 
    6063                  <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> 
    6283                <transformationSet> 
    6384                  <dir>${jboss.server}</dir> 
     
    6687                  </includes> 
    6788                  <stylesheet>src/main/xsl/standardjboss.xsl</stylesheet> 
     89                  <parameters> 
     90                    <parameter> 
     91                      <name>protocol</name> 
     92                      <value>${nuxeo.protocol}</value> 
     93                    </parameter> 
     94                  </parameters> 
    6895                </transformationSet> 
    6996                <transformationSet> 
     
    73100                  </includes> 
    74101                  <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> 
    75120                </transformationSet> 
    76121                <transformationSet> 
     
    80125                  </includes> 
    81126                  <stylesheet>src/main/xsl/ds.xsl</stylesheet> 
     127                  <parameters> 
     128                    <parameter> 
     129                      <name>protocol</name> 
     130                      <value>${nuxeo.protocol}</value> 
     131                    </parameter> 
     132                  </parameters> 
    82133                </transformationSet> 
    83134              </transformationSets> 
  • nuxeo-ep/trunk/jboss-patch/src/main/xsl/ds.xsl

    r29715 r29777  
    11<xsl:stylesheet version="1.0" 
    22    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    3  
     3    <xsl:param name="protocol" select="jrmp"/> 
    44 
    55  <!-- copy with attributes, and keep comments --> 
    66  <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 --> 
    718    <xsl:copy> 
    8       <xsl:apply-templates select="@*|node()|comment()"/> 
     19      <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 
    920    </xsl:copy> 
    1021  </xsl:template> 
    1122 
     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> 
    1229 
    1330  <!-- 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"> 
    1535        <xsl:comment>Nuxeo patch: previous invoker specification removed</xsl:comment> 
    1636  </xsl:template> 
    1737 
    1838  <!-- Adding JMX invoker specification --> 
    19   <xsl:template match="local-tx-datasource/jndi-name"
     39  <xsl:template match="local-tx-datasource/jndi-name" mode="http"
    2040    <xsl:copy> 
    2141      <xsl:apply-templates select="@*|node()"/> 
     
    2646 
    2747  <!-- 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"> 
    2953        <xsl:comment>Nuxeo patch: previous invoker specification removed</xsl:comment> 
    3054  </xsl:template> 
    3155 
    3256  <!-- Adding JMX invoker specification --> 
    33   <xsl:template match="xa-datasource/jndi-name"
     57  <xsl:template match="xa-datasource/jndi-name" mode="http"
    3458    <xsl:copy> 
    3559      <xsl:apply-templates select="@*|node()"/> 
  • nuxeo-ep/trunk/jboss-patch/src/main/xsl/jboss-service.xsl

    r29740 r29777  
    22    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33 
     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"/> 
    48 
    59  <!-- copy with attributes, and keep comments --> 
    610  <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 --> 
    722    <xsl:copy> 
    8       <xsl:apply-templates select="@*|node()|comment()"/> 
     23      <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 
    924    </xsl:copy> 
    1025  </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> 
    1155 
    1256 
    1357  <!-- 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"
    1559        <xsl:comment>Nuxeo patch: mbean[jboss:service=invoker,type=jrmp] removed</xsl:comment> 
    1660  </xsl:template> 
    1761 
    1862  <!-- 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"
    2064        <xsl:comment>Nuxeo patch: mbean[jboss:service=invoker,type=pooled] removed</xsl:comment> 
    2165  </xsl:template> 
    2266 
    2367  <!-- 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"
    2569        <xsl:comment>Nuxeo patch: mbean[jboss.mq:service=InvocationLayer,type=UIL2] removed</xsl:comment> 
    2670  </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"
    2973      <xsl:comment>Nuxeo patch: mbean[jboss.mq:service=InvocationLayer,type=HTTP] change connection factory</xsl:comment><xsl:text> 
    3074         </xsl:text><attribute name='ConnectionFactoryJNDIRef'>ConnectionFactory</attribute> 
    3175  </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"
    3377      <xsl:comment>Nuxeo patch: mbean[jboss.mq:service=InvocationLayer,type=HTTP] change connection factory</xsl:comment><xsl:text> 
    3478         </xsl:text><attribute name='XAConnectionFactoryJNDIRef'>XAConnectionFactory</attribute> 
     
    3680 
    3781  <!-- 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 
    42102 
    43103  <!-- Getting rid of WebService mbean and its dependencies 
     
    50110   
    51111  <!-- 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"
    53113        <xsl:comment>Nuxeo patch: mbean[jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory] replaced</xsl:comment><xsl:text> 
    54114      </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> 
    56116         </xsl:text><depends optional-attribute-name="InvokerName">jboss.jmx:type=adaptor,name=Invoker</depends><xsl:text> 
    57117         </xsl:text><depends>jboss:service=invoker,type=http</depends><xsl:text> 
     
    73133 
    74134  <!-- 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"
    76136     <xsl:comment>Nuxeo patch: Replacing proxy dependency for mbean[jboss.admin:service=PluginManager]</xsl:comment><xsl:text> 
    77137     </xsl:text><depends>jboss.jmx:type=adaptor,name=Invoker,protocol=http,service=proxyFactory</depends><xsl:text> 
     
    79139  </xsl:template> 
    80140 
    81   <xsl:template match="mbean[(@name!='jboss.admin:service=PluginManager')and(count(depends[text()='jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory'])&gt;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'])&gt;0)]" mode="http"
    82142        <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> 
    83143  </xsl:template> 
    84144 
    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"
    86146        <xsl:comment>Nuxeo patch: mbean[jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=http] removed</xsl:comment> 
    87147  </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"
    89149        <xsl:comment>Nuxeo patch: mbean[jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp] removed</xsl:comment> 
    90150  </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"
    92152      <xsl:comment>Nuxeo patch: added naming aliases to the Http Proxy</xsl:comment><xsl:text> 
    93153      </xsl:text><mbean code="org.jboss.naming.NamingAlias" name="jboss.jmx:alias=jmx/invoker/RMIAdaptor"><xsl:text> 
     
    103163      </xsl:text></mbean> 
    104164  </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"
    106166        <xsl:comment>Nuxeo patch: mbean[jboss.jmx:alias=jmx/invoker/RMIAdaptor] removed</xsl:comment> 
    107167  </xsl:template> 
    108168 
    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  
    125169  <!-- 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"
    127171   <xsl:comment>Nuxeo patch: mbean[jboss:service=ClientUserTransaction] now depends on HTTP Proxy</xsl:comment><xsl:text> 
    128172   </xsl:text><mbean code="org.jboss.tm.usertx.server.ClientUserTransactionService" name="jboss:service=ClientUserTransaction" xmbean-dd="resource:xmdesc/ClientUserTransaction-xmbean.xml"><xsl:text> 
     
    159203 
    160204  <!-- 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"
    162206      <xsl:comment>Nuxeo patch: mbean[jboss:service=Naming] now does not listen to JNP port</xsl:comment><xsl:text> 
    163207         </xsl:text><attribute name='Port'>-1</attribute> 
    164208  </xsl:template> 
    165209  <!-- 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"
    167211      <xsl:comment>Nuxeo patch: mbean[jboss:service=Naming] now does not bind to network</xsl:comment><xsl:text> 
    168212         </xsl:text><attribute name='RmiBindAddress'>localhost</attribute> 
     
    170214 
    171215  <!-- We remove attribute[InvokerURLPrefix] as redundant --> 
    172   <xsl:template match="mbean/attribute[@name='InvokerURLPrefix']"
     216  <xsl:template match="mbean/attribute[@name='InvokerURLPrefix']" mode="http"
    173217                <xsl:comment>Nuxeo patch: removing attribute[InvokerURLPrefix]</xsl:comment> 
    174218  </xsl:template> 
    175219 
    176220  <!-- We remove attribute[InvokerURLPrefix] as evil --> 
    177   <xsl:template match="mbean/attribute[@name='UseHostName']"
     221  <xsl:template match="mbean/attribute[@name='UseHostName']" mode="http"
    178222                <xsl:comment>Nuxeo patch: removing attribute[UseHostName]</xsl:comment> 
    179223  </xsl:template> 
    180224 
    181225  <!-- 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"
    183227                <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> 
    185229  </xsl:template> 
    186230 
    187231  <!-- 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"
    189233                <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> 
    191235  </xsl:template> 
    192236 
    193237 
    194238  <!-- 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"
    196240     <xsl:comment>Nuxeo patch: mbean[jboss.j2ee:service=EARDeployer]: removing redundant attribute</xsl:comment><xsl:text> 
    197241   </xsl:text><mbean code="org.nuxeo.runtime.jboss.deployment.NuxeoDeployer" name="jboss.j2ee:service=EARDeployer"><xsl:text> 
     
    212256      </xsl:text></xsl:comment><xsl:text> 
    213257      </xsl:text><attribute name="Debug">true</attribute><xsl:text> 
     258      </xsl:text><depends>jboss:service=invoker,type=http</depends><xsl:text> 
    214259   </xsl:text></mbean> 
    215260  </xsl:template> 
    216261 
    217262  <!-- 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"
    219264      <xsl:comment>Nuxeo patch: mbean[jboss.j2ee:service=EARDeployer] now depends on HTTP invoker</xsl:comment><xsl:text> 
    220265      </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> 
    222267  </xsl:template> 
    223268 
  • nuxeo-ep/trunk/jboss-patch/src/main/xsl/standardjboss.xsl

    r29715 r29777  
    22    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33 
     4    <xsl:param name="protocol" select="jrmp"/> 
    45 
    56  <!-- copy with attributes, and keep comments --> 
    67  <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 --> 
    719    <xsl:copy> 
    8       <xsl:apply-templates select="@*|node()|comment()"/> 
     20      <xsl:apply-templates select="@*|node()|comment()" mode="jrmp"/> 
    921    </xsl:copy> 
    1022  </xsl:template> 
    1123 
     24 
    1225  <!-- 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"
    1427      <xsl:comment>Nuxeo patch: invoker proxy binding renamed</xsl:comment><xsl:text> 
    1528      </xsl:text><name><xsl:value-of select="concat(substring-before(text(),'-rmi-'), '-http-',substring-after(text(),'-rmi-'))"/></name> 
    1629  </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"
    1831      <xsl:comment>Nuxeo patch: invoker proxy binding renamed</xsl:comment><xsl:text> 
    1932      </xsl:text><invoker-mbean><xsl:value-of select="concat(substring-before(text(),'jrmp'), 'http',substring-after(text(),'jrmp'))"/></invoker-mbean> 
    2033  </xsl:template> 
    2134 
    22   <xsl:template match="invoker-proxy-binding-name[contains(text(),'-rmi-')]"
     35  <xsl:template match="invoker-proxy-binding-name[contains(text(),'-rmi-')]" mode="http"
    2336      <xsl:comment>Nuxeo patch: invoker proxy binding renamed</xsl:comment><xsl:text> 
    2437      </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  
    22    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33 
     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"/> 
    48 
    59  <!-- copy with attributes, and keep comments --> 
    610  <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 --> 
    722    <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"/> 
    931    </xsl:copy> 
    1032  </xsl:template> 
    1133 
    1234  <!-- 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"
    1436      <xsl:comment>Nuxeo patch: removing servlet[ServerInvokerServlet]</xsl:comment>    
    1537  </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"
    1739      <xsl:comment>Nuxeo patch: removing servlet[Ejb3InvokerServlet]</xsl:comment>    
    1840  </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"
    2042      <xsl:comment>Nuxeo patch: removing servlet-mapping[ServerInvokerServlet]</xsl:comment>    
    2143  </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"> 
    2358      <xsl:comment>Nuxeo patch: removing servlet-mapping[Ejb3InvokerServlet]</xsl:comment>    
    2459  </xsl:template> 
    2560 
    2661  <!-- Updating EJB3 connector servlets --> 
    27   <xsl:template match="web-app/servlet[1]"
     62  <xsl:template match="web-app/servlet[1]" mode="http"
    2863    <xsl:copy> 
    2964      <xsl:apply-templates select="@*|node()|comment()"/> 
     
    3974         </xsl:text><init-param><xsl:text> 
    4075            </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> 
    4277            </xsl:text><description>The servlet server invoker locator url</description><xsl:text> 
    4378         </xsl:text></init-param><xsl:text> 
     
    5388         </xsl:text><init-param><xsl:text> 
    5489            </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> 
    5691            </xsl:text><description>The servlet server invoker locator url</description><xsl:text> 
    5792         </xsl:text></init-param><xsl:text> 
     
    6196 
    6297  <!-- Updating EJB3 connector servlets --> 
    63   <xsl:template match="web-app/servlet-mapping[1]"
     98  <xsl:template match="web-app/servlet-mapping[1]" mode="http"
    6499    <xsl:copy> 
    65100      <xsl:apply-templates select="@*|node()|comment()"/>