[jboss-jira] [JBoss JIRA] (WFLY-3791) @Startup can't effectively read the management model
Jason Greene (JIRA)
issues at jboss.org
Fri Aug 29 22:35:00 EDT 2014
[ https://issues.jboss.org/browse/WFLY-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Greene closed WFLY-3791.
------------------------------
Fix Version/s: No Release
Resolution: Rejected
This is by design. Deployment startup is part of the management model execution, so any data read is inherently racy. Further, any writes or operation executions will deadlock since the deployment operations are management operations themselves and when executing lock the model.
It is possible to access the model after deployment, however even then you can't take any actions that would affect the state of your deployment.
Essentially the management model is intended for external clients.
There are other mechanisms available to pass information to deployments. You can define system properties in the management model, for example. These properties can also be referenced by other configuration sections. You can also define constant values in JNDI using the naming subsystem.
> @Startup can't effectively read the management model
> ----------------------------------------------------
>
> 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
> Fix For: No Release
>
>
> 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