[jboss-jira] [JBoss JIRA] (WFLY-3791) Error on ModelControllerClient to list sections

ofbiz brazil (JIRA) issues at jboss.org
Fri Aug 29 21:22:00 EDT 2014


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

ofbiz brazil commented on WFLY-3791:
------------------------------------

This issue seems to be related to a case when we have an @Startup EJB and Wildfly can not answer security status at that time.

Why in JBoss 7.1.1 does it have a different behaviour, and I can really get its value?

Example:
------------
@Startup
@Singleton
@Remote
public class SmbConfigBean {

    private static final long serialVersionUID = 1L;

    @PostConstruct
    private void init() throws Exception {
        final ModelControllerClient client = ModelControllerClient.Factory.create("http-remoting", InetAddress.getLocalHost(), 9029);

        final ModelNode op = Operations.createReadResourceOperation(new ModelNode().addEmptyList().add("subsystem","security"));
        op.get("recursive").set(true);

        final ModelNode result = client.execute(op);

        if (Operations.isSuccessfulOutcome(result)) {
            System.out.println(Operations.readResult(result));

        } else {
            System.out.println(Operations.getFailureDescription(result));
        }
    }
}

> Error on ModelControllerClient to list sections
> -----------------------------------------------
>
>                 Key: WFLY-3791
>                 URL: https://issues.jboss.org/browse/WFLY-3791
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Domain Management
>    Affects Versions: 8.1.0.Final
>         Environment: Java 7
>            Reporter: ofbiz brazil
>            Assignee: Darran Lofthouse
>
> Hello,
> When there's a client trying to list a node for a security section, Wildfly says it does not exist but on Jboss 7.1.1 it works fine.
> Java Code:
> {code:java}
>   	final ModelNode request = new ModelNode();
>     	request.get(ClientConstants.OP).set("read-resource");
>     	request.get("recursive").set(true);
>     	request.get(ClientConstants.OP_ADDR).add("subsystem", "security");
>     	final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getByName("127.0.0.1"), 9999);
>     	final ModelNode response = client.execute(new OperationBuilder(request).build());
>         final String section = response.get(ClientConstants.RESULT).get("security-domain")
>                 .get("pw_MSSQL_CAS_DS")
> {code}
> Result:
> ---------
> {code}
> {
>     "outcome" => "failed",
>     "failure-description" => "JBAS014807: Management resource '[(\"subsystem\" => \"security\")]' not found",
>     "rolled-back" => true
> }
> {code}
> Cheers,



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list