jboss as 7:JBAS014639:启用的属性不可写(部署属性)

时间:2013-08-20 20:28:00

标签: java deployment jboss jboss7.x

我已经通过jboss-cli向所有我的服务器组部署了一个应用程序,并且应用程序已启用给所有组。直到那没关系!

BUT

我需要通过jboss-cli从我的一个群组(称为“本田”)禁用(而不是取消部署)该应用。问题是此选项仅可通过Web控制台使用。

当我通过jboss-cli并执行此

/server-group=honda/deployment=app01.war:write-attribute(name=enabled, value=false)

我收到了回复

{
    "outcome" => "failed",
    "failure-description" => {"domain-failure-description" => "JBAS014639: Attribute enabled is not writable"},
    "rolled-back" => true
}

我已经在google找了'JBAS014639:已启用属性不可写'但未找到任何有关部署已启用属性的资源

请帮帮我

1 个答案:

答案 0 :(得分:0)

使用:您看到的WAR上的read-resource-description:

        "enabled" => {
            "type" => BOOLEAN,
            "description" => "Boolean indicating whether the deployment content is currently deployed in the runtime (or should be deployed in the runtime the next time the server starts.)",
            "expressions-allowed" => false,
            "nillable" => true,
            "default" => false,
            "access-type" => "read-only",
            "storage" => "configuration"
        },

由于access-type =只读,您会收到错误。你有另一个领域:

            "status" => {
            "type" => STRING,
            "description" => "The current runtime status of a deployment. Possible status modes are OK, FAILED, and STOPPED. FAILED indicates a dependency is missing or a service could not start. STOPPED indicates that the deployment was not enabled or was manually stopped.",

所以我猜你想要的是你的WAR启用了= false和status = STOPPED并且你的WAR没有删除。你可以通过以下方式之一得到这个:

:read-operation-names
{
"outcome" => "success",
"result" => [
    "add",
    "deploy",
    "read-attribute",
    "read-children-names",
    "read-children-resources",
    "read-children-types",
    "read-operation-description",
    "read-operation-names",
    "read-resource",
    "read-resource-description",
    "redeploy",
    "remove",
    "undefine-attribute",
    "undeploy",
    "whoami",
    "write-attribute"
]
}

在这种情况下,您可以使用:undeploy来禁用应用程序,并使用:deploy来启用它。这就是网络控制台的功能。