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

Java jboss as 7:JBAS014639:启用的属性不可写(部署属性),java,deployment,jboss,jboss7.x,Java,Deployment,Jboss,Jboss7.x,我已经通过jboss cli将一个应用程序部署到我的所有服务器组,并且该应用程序已对所有组启用。在那之前没关系 但是 我需要通过jboss cli从我的一个组(称为“honda”)禁用应用程序(而不是取消部署)。问题是此选项仅通过web控制台可用 当我通过jboss cli并执行此命令时 /server-group=honda/deployment=app01.war:write-attribute(name=enabled, value=false) 我得到了答复 { "outcom

我已经通过jboss cli将一个应用程序部署到我的所有服务器组,并且该应用程序已对所有组启用。在那之前没关系

但是

我需要通过jboss cli从我的一个组(称为“honda”)禁用应用程序(而不是取消部署)。问题是此选项仅通过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:Attribute enabled is not writable”,但没有找到关于部署的enabled属性的任何资源


请帮助我:阅读您看到的关于战争的资源描述:

        "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"
        },
由于访问类型=只读,因此会出现错误。您还有另一个字段:

            "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.",
所以我猜你想要的是你的战争已经启用=false,状态=停止,并且你的战争没有被移除。您可以使用以下其中一种方法获得此信息:

: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启用应用程序。这就是web控制台的功能