What is the use of persistent attribute of DataSource operation enable in EAP 6

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.1.x
    • 6.2 beta

Issue

  • What is the use of attribute "persistent" in the DataSource operation "enable" ?
    Example: All the following commands do the same thing:
/subsystem=datasources/data-source=TestDataSource:enable

/subsystem=datasources/data-source=TestDataSource:enable(persistent=true)

/subsystem=datasources/data-source=TestDataSource:enable(persistent=false)

Resolution

  • The attribute "persistent" does not make much sense here and by default persistent is "true" for the Enabled operation. That seems to be a reason that in the current release of JBoss are able to see to see this attribute, however in Upstream release of JBoss you wont see this attribute as it is removed.

**Output in EAP6.2 beta **

[standalone@localhost:9999 /] /subsystem=datasources/data-source=TestDataSource:read-operation-description(name=enable)
{                                                                                                                
    "outcome" => "success",
    "result" => {
        "operation-name" => "enable",
        "description" => "Enable the data-source",
        "request-properties" => {"persistent" => {
            "type" => BOOLEAN,
            "description" => "if true enable attribute is persisted",
            "expressions-allowed" => false,
            "required" => true,
            "nillable" => false,
            "default" => true
        }},
        "reply-properties" => {},
        "read-only" => false
    }
}

From Wildfly-8.0.0 onwards One will not be able to see this "persistent" attribute for the "enable" operation.

[standalone@localhost:9999 /] /subsystem=datasources/data-source=TestDataSource:read-operation-description(name=enable)
{
    "outcome" => "success",
    "result" => {
        "operation-name" => "enable",
        "description" => "Enable the data-source",
        "request-properties" => {},
        "reply-properties" => {},
        "read-only" => false
    }
}
  • So ideally the following command is enough in order to enable the DataSource:
/subsystem=datasources/data-source=TestDataSource:enable

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments