[jboss-jira] [JBoss JIRA] (WFLY-646) TS: Dynamic way to get ports of various services.
Ondrej Zizka (JIRA)
issues at jboss.org
Wed Feb 10 03:28:01 EST 2016
[ https://issues.jboss.org/browse/WFLY-646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ondrej Zizka reassigned WFLY-646:
---------------------------------
Assignee: (was: Ondrej Zizka)
> TS: Dynamic way to get ports of various services.
> -------------------------------------------------
>
> Key: WFLY-646
> URL: https://issues.jboss.org/browse/WFLY-646
> Project: WildFly
> Issue Type: Sub-task
> Components: Test Suite
> Reporter: Ondrej Zizka
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> {code:java}
> private int getRecoveryManagerPort() throws IOException {
> /* /socket-binding-group=standard-sockets/socket-binding=txn-recovery-environment:read-attribute(name=port) */
> final ModelNode address = new ModelNode();
> address.add("socket-binding-group", "standard-sockets");
> address.add("socket-binding", "txn-recovery-environment");
> final ModelNode operation = new ModelNode();
> operation.get(OP).set(READ_ATTRIBUTE_OPERATION);
> operation.get(OP_ADDR).set(address);
> operation.get("name").set("port");
> try {
> return executeOperation(operation).asInt();
> } catch (MgmtOperationException ignored) { }
> return -1;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list