<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Get different model for 'add subsystem step' in standalone/domain mode
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/dastraub">Daniel Straub</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/730355#730355">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I work on an extension, this extensensio has a model like this (simplified) :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: courier new,courier;">[domain@localhost:9999 /] /host=dcs1/server=dcs1/subsystem=config-mgnt:read-resource-description</span></p><p><span style="font-family: courier new,courier;">{</span></p><p><span style="font-family: courier new,courier;">    "outcome" => "success",</span></p><p><span style="font-family: courier new,courier;">    "result" => {</span></p><p><span style="font-family: courier new,courier;">        "description" => "ConfigManagement Extension",</span></p><p><span style="font-family: courier new,courier;">        "head-comment-allowed" => true,</span></p><p><span style="font-family: courier new,courier;">        "tail-comment-allowed" => true,</span></p><p><span style="font-family: courier new,courier;">        "namespace" => "urn:de.xxxx:1.0",</span></p><p><span style="font-family: courier new,courier;">        "attributes" => {</span></p><p><span style="font-family: courier new,courier;">            "user" => {</span></p><p><span style="font-family: courier new,courier;">                "description" => "user name",</span></p><p><span style="font-family: courier new,courier;">                "type" => STRING,</span></p><p><span style="font-family: courier new,courier;">                "required" => true,</span></p><p><span style="font-family: courier new,courier;">                "nillable" => false,</span></p><p><span style="font-family: courier new,courier;">                "access-type" => "read-only",</span></p><p><span style="font-family: courier new,courier;">                "storage" => "configuration",</span></p><p><span style="font-family: courier new,courier;">                "restart-required" => "no-services"</span></p><p><span style="font-family: courier new,courier;">            },</span></p><p><span style="font-family: courier new,courier;">            "credential" => {</span></p><p><span style="font-family: courier new,courier;">                "description" => "user credential",</span></p><p><span style="font-family: courier new,courier;">                "type" => STRING,</span></p><p><span style="font-family: courier new,courier;">                "required" => true,</span></p><p><span style="font-family: courier new,courier;">                "nillable" => false,</span></p><p><span style="font-family: courier new,courier;">                "access-type" => "read-only",</span></p><p><span style="font-family: courier new,courier;">                "storage" => "configuration",</span></p><p><span style="font-family: courier new,courier;">                "restart-required" => "no-services"</span></p><p><span style="font-family: courier new,courier;">            }</span></p><p><span style="font-family: courier new,courier;">        }</span></p><p><span style="font-family: courier new,courier;">    }</span></p><p><span style="font-family: courier new,courier;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In standalone mode, I can populate the parsed model in an an step handler (AbstractBoottimeAddStepHandler.populateModel)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Log:</p><p><span style="font-family: courier new,courier;">19:04:01,651 DEBUG [config-management] (ServerService Thread Pool -- 48)  performBoottime {</span></p><p><span style="font-family: courier new,courier;">    "address" => [("subsystem" => "config-mgnt")],</span></p><p><span style="font-family: courier new,courier;">    "user" => "dcs",</span></p><p><span style="font-family: courier new,courier;">    "credential" => "xxxx"</span></p><p><span style="font-family: courier new,courier;">}</span></p><p>CLI:</p><p><span style="font-family: courier new,courier;">[standalone@localhost:9999 /] /subsystem=config-mgnt:read-resource</span></p><p><span style="font-family: courier new,courier;">{</span></p><p><span style="font-family: courier new,courier;">    "outcome" => "success",</span></p><p><span style="font-family: courier new,courier;">    "result" => {</span></p><p><span style="font-family: courier new,courier;">        "address" => [("subsystem" => "config-mgnt")],</span></p><p><span style="font-family: courier new,courier;">        "credential" => "xxxx",</span></p><p><span style="font-family: courier new,courier;">        "user" => "dcs"</span></p><p><span style="font-family: courier new,courier;">    }</span></p><p><span style="font-family: courier new,courier;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>in domain  mode the handler received only an model node with operation and address.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Log : </p><p><span style="font-family: courier new,courier;">[Server:dcs1] 19:01:24,258 DEBUG [config-management] (ServerService Thread Pool -- 26)  performBoottime {"address" => [("subsystem" => "config-mgnt")]}</span></p><p>CLI:</p><p><span style="font-family: courier new,courier;">[domain@localhost:9999 /] /host=dcs1/server=dcs1/subsystem=config-mgnt:read-resource</span></p><p><span style="font-family: courier new,courier;">{</span></p><p><span style="font-family: courier new,courier;">    "outcome" => "success",</span></p><p><span style="font-family: courier new,courier;">    "result" => {"address" => [("subsystem" => "config-mgnt")]}</span></p><p><span style="font-family: courier new,courier;">}</span></p><p><span style="font-family: courier new,courier;"><br/></span></p><p>The Subsystem looks like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@Overridepublic void initialize(ExtensionContext context) {    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME);    subsystem.registerXMLElementWriter(ConfigManagementSubsystemParser.INSTANCE);        final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(ConfigManagementDescriptionProvider.SubsytemDescription);    registration.registerOperationHandler(ADD, ConfigManagementExtensionAdd.INSTANCE, ConfigManagementDescriptionProvider.SubsystemAddDescription, false);    registration.registerOperationHandler(DESCRIBE, ConfigManagementDescriptionProvider.INSTANCE, ConfigManagementDescriptionProvider.INSTANCE, false, OperationEntry.EntryType.PRIVATE);    registration.registerReadWriteAttribute(PROPAGATION, null, new ConfigParamWriteHandler(), Storage.CONFIGURATION);    registration.registerReadWriteAttribute(CONTROLLER, null, new ConfigParamWriteHandler(), Storage.CONFIGURATION);    registration.registerReadWriteAttribute(USER_CREDENTIAL, null, new ConfigParamWriteHandler(), Storage.CONFIGURATION);    registration.registerReadWriteAttribute(USER_NAME, null, new ConfigParamWriteHandler(), Storage.CONFIGURATION);   ....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If compare this e.g. with other extensions (e.g. Webservices, Transactions etc), I can't find any differences in the way, how the subsystem, description providers etc. are implemented.</p><p>I guess, I forget an little important step, but I can't find it ...<span> X-( </span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/730355#730355">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>