[
https://issues.jboss.org/browse/AS7-4012?page=com.atlassian.jira.plugin.s...
]
Tomaz Cerar commented on AS7-4012:
----------------------------------
You should add something like this:
op.get(ModelDescriptionConstants.REQUEST_PROPERTIES, CommonAttributes.XTS_ENVIRONMENT,
ModelDescriptionConstants.VALUE_TYPE, ModelDescriptionConstants.URL,
ModelDescriptionConstants.
EXPRESSIONS_ALLOWED).set(true);
firstly in parser you need to call ParseUtils.parsePossibleExpression(value) and you will
get back ModelNode that has everything set correctly.
and then when you need the value (usually in performBoottime) you call
context.resolveExpressions(model)
But given the fact that xts subsystem has really small amount of attributes and
operations, better way to do it would be to convert everything to AttributeDefinition and
ResourceDefinition, you can look for example, web/mail/jacorb/... subsystem all of those
ware converted (web most recently)
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