[
https://issues.jboss.org/browse/AS7-4012?page=com.atlassian.jira.plugin.s...
]
Paul Robinson commented on AS7-4012:
------------------------------------
Thanks Tomaz,
It's looking like this needs fixing today (due for 7.1.1). Therefore I may need to opt
for the low risk approach of having the expression parsed using
context.resolveExpressions, etc.
However, this approach only seems to support values that are just expressions, for example
"${my.key}" works, but "${my.key}/something" doesn't. See the
following code that does the variable replacement:
https://github.com/npfr/jboss-as/blob/master/server/src/main/java/org/jbo...
From looking at the current server configs, the only place where a
string containing an expression is used is for the jboss.server.config.dir variable, which
I seem to remember is "special" and dealt with differently.
<module-option name="usersProperties"
value="${jboss.server.config.dir}/application-users.properties"/>
this explains why no-one else has hit this issue.
So one fix, could be to fix the RuntimeExpressionResolver#resolvePluggableExpression to
handle variables embedded in a larger string.
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