0

我已经通过 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”,但没有找到关于部署的启用属性的任何资源

请帮我

4

1 回答 1

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=read-only 你得到错误。你有另一个领域:

            "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 启用它。这就是网络控制台的作用。

于 2014-01-14T23:05:50.527 回答