[jboss-dev-forums] [JBoss AS 7 Development] - Get different model for 'add subsystem step' in standalone/domain mode

Daniel Straub do-not-reply at jboss.com
Mon Apr 16 13:12:28 EDT 2012


Daniel Straub [https://community.jboss.org/people/dastraub] created the discussion

"Get different model for 'add subsystem step' in standalone/domain mode"

To view the discussion, visit: https://community.jboss.org/message/730355#730355

--------------------------------------------------------------
I work on an extension, this extensensio has a model like this (simplified) :

[domain at localhost:9999 /] /host=dcs1/server=dcs1/subsystem=config-mgnt:read-resource-description
{
    "outcome" => "success",
    "result" => {
        "description" => "ConfigManagement Extension",
        "head-comment-allowed" => true,
        "tail-comment-allowed" => true,
        "namespace" => "urn:de.xxxx:1.0",
        "attributes" => {
            "user" => {
                "description" => "user name",
                "type" => STRING,
                "required" => true,
                "nillable" => false,
                "access-type" => "read-only",
                "storage" => "configuration",
                "restart-required" => "no-services"
            },
            "credential" => {
                "description" => "user credential",
                "type" => STRING,
                "required" => true,
                "nillable" => false,
                "access-type" => "read-only",
                "storage" => "configuration",
                "restart-required" => "no-services"
            }
        }
    }
}

In standalone mode, I can populate the parsed model in an an step handler (AbstractBoottimeAddStepHandler.populateModel)

Log:
19:04:01,651 DEBUG [config-management] (ServerService Thread Pool -- 48)  performBoottime {
    "address" => [("subsystem" => "config-mgnt")],
    "user" => "dcs",
    "credential" => "xxxx"
}
CLI:
[standalone at localhost:9999 /] /subsystem=config-mgnt:read-resource
{
    "outcome" => "success",
    "result" => {
        "address" => [("subsystem" => "config-mgnt")],
        "credential" => "xxxx",
        "user" => "dcs"
    }
}

in domain  mode the handler received only an model node with operation and address.

Log : 
[Server:dcs1] 19:01:24,258 DEBUG [config-management] (ServerService Thread Pool -- 26)  performBoottime {"address" => [("subsystem" => "config-mgnt")]}
CLI:
[domain at localhost:9999 /] /host=dcs1/server=dcs1/subsystem=config-mgnt:read-resource
{
    "outcome" => "success",
    "result" => {"address" => [("subsystem" => "config-mgnt")]}
}


The Subsystem looks like this:


@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);   ....


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.
I guess, I forget an little important step, but I can't find it ... X-(
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/730355#730355]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120416/378c3383/attachment.html 


More information about the jboss-dev-forums mailing list