[jboss-jira] [JBoss JIRA] (AS7-4012) xts-environment.url in standalone-xts.xml cannot take an expression

Paul Robinson (JIRA) jira-events at lists.jboss.org
Mon Mar 5 09:37:36 EST 2012


    [ https://issues.jboss.org/browse/AS7-4012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673604#comment-12673604 ] 

Paul Robinson commented on AS7-4012:
------------------------------------

Ivo, 

Can you expand on the following statement as I'm not too clear on what you mean:

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

                
> xts-environment.url in standalone-xts.xml cannot take an expression
> -------------------------------------------------------------------
>
>                 Key: AS7-4012
>                 URL: https://issues.jboss.org/browse/AS7-4012
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 7.1.0.Final
>            Reporter: Ivo Studensky
>            Assignee: Paul Robinson
>            Priority: Critical
>             Fix For: 7.1.1.Final
>
>
> 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:
> {noformat}
>         <subsystem xmlns="urn:jboss:domain:xts:1.0">
>             <xts-environment url="http://localhost:8080/ws-c11/ActivationService"/>
>         </subsystem>
> {noformat}
> 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:
> {noformat}
> 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)
> {noformat}
> 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:
> {noformat}
> final String coordinatorURL = model.get(CommonAttributes.XTS_ENVIRONMENT).hasDefined(ModelDescriptionConstants.URL) ? context.resolveExpressions(model.get(CommonAttributes.XTS_ENVIRONMENT, ModelDescriptionConstants.URL)).asString() : null;
> {noformat}
> but it did not help, the model.get(CommonAttributes.XTS_ENVIRONMENT, ModelDescriptionConstants.URL) node seems to be String type instead of expression type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list