[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 10:40:36 EST 2012
[ https://issues.jboss.org/browse/AS7-4012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673640#comment-12673640 ]
Paul Robinson edited comment on AS7-4012 at 3/5/12 10:39 AM:
-------------------------------------------------------------
Yes, I need to changed the Node's model type to expression. I was expecting to set it in the following on lines 29 and 48. But these methods are not invoked at boot time.
https://github.com/jbossas/jboss-as/blob/master/xts/src/main/java/org/jboss/as/xts/Descriptions.java
Do you have any ideas where/when the type is set?
was (Author: paul.robinson):
Yes, I need to changed the Node's model type to expression. I was expecting to set it in here:
> 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: "127.0.0.1}:8080"
> at java.net.URL.<init>(URL.java:601) [rt.jar:1.6.0_31]
> at java.net.URL.<init>(URL.java:464) [rt.jar:1.6.0_31]
> at java.net.URL.<init>(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