Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4012

xts-environment.url in standalone-xts.xml cannot take an expression

    XMLWordPrintable

Details

    Description

      AS7 configuration should include expressions like ${jboss.bind.address:127.0.0.1} instead of hardcoded hostnames in URLs. The xts-environment.url in standalone-xts.xml is set to 'http://localhost:8080/ws-c11/ActivationService' which makes troubles when AS7 is bound to a different IP than localhost or in IPv6 environment. See the conf file snippet:

              <subsystem xmlns="urn:jboss:domain:xts:1.0">
                  <xts-environment url="http://localhost:8080/ws-c11/ActivationService"/>
              </subsystem>
      

      But when I tried to change the URL to 'http://${jboss.bind.address:127.0.0.1}:8080/ws-c11/ActivationService', the XTS tests in AS7 testsuite failed with:

      13:59:11,669 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-4-thread-1) Failed: org.jboss.as.test.xts.simple.wsat.client.WSATTestCase.testRollback: com.arjuna.wst.SystemException: javax.xml.ws.WebServiceException: Could not send Message.
      	at com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple.startTransaction(UserTransactionImple.java:308) [jbossxts-4.16.2.Final.jar:]
      	at com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple.begin(UserTransactionImple.java:80) [jbossxts-4.16.2.Final.jar:]
      	at com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple.begin(UserTransactionImple.java:70) [jbossxts-4.16.2.Final.jar:]
      	at org.jboss.as.test.xts.simple.wsat.client.WSATTestCase.testRollback(WSATTestCase.java:113) [classes:]
      ...
      Caused by: java.net.MalformedURLException: For input string: &quot;127.0.0.1}:8080&quot;
      	at java.net.URL.&lt;init&gt;(URL.java:601) [rt.jar:1.6.0_31]
      	at java.net.URL.&lt;init&gt;(URL.java:464) [rt.jar:1.6.0_31]
      	at java.net.URL.&lt;init&gt;(URL.java:413) [rt.jar:1.6.0_31]
      	at org.apache.cxf.transport.http.HTTPConduit.setupURL(HTTPConduit.java:689)
      	at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:463)
      	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
      

      The cause of this failure was that the expression from the url was not resolved.
      Paul, please could you take a look at it and fix the XTS configuration to be able to resolve expressions?

      I tried to change line 149 in org.jboss.as.xts.XTSSubsystemAdd class to:

      final String coordinatorURL = model.get(CommonAttributes.XTS_ENVIRONMENT).hasDefined(ModelDescriptionConstants.URL) ? context.resolveExpressions(model.get(CommonAttributes.XTS_ENVIRONMENT, ModelDescriptionConstants.URL)).asString() : null;
      

      but it did not help, the model.get(CommonAttributes.XTS_ENVIRONMENT, ModelDescriptionConstants.URL) node seems to be String type instead of expression type.

      Attachments

        Issue Links

          Activity

            People

              paul.robinson@redhat.com Paul Robinson
              istudens@redhat.com Ivo Studensky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: