[jboss-jira] [JBoss JIRA] (AS7-4020) add-jvm-option operation does not work

Bernard Tison (JIRA) jira-events at lists.jboss.org
Sat Mar 3 08:10:36 EST 2012


Bernard Tison created AS7-4020:
----------------------------------

             Summary: add-jvm-option operation does not work
                 Key: AS7-4020
                 URL: https://issues.jboss.org/browse/AS7-4020
             Project: Application Server 7
          Issue Type: Bug
    Affects Versions: 7.1.0.Final
            Reporter: Bernard Tison


setup: domain started in domain mode with ./domain.sh

>From CLI:
[domain at localhost:9999 /] /host=master/server-config=server-one/jvm=default:add
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}
[domain at localhost:9999 /] /host=master/server-config=server-one/jvm=default:add-jvm-option(jvm-option="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n")
'jvm-option' is not found among the supported properties: [type]

But when I try to use type:
[domain at localhost:9999 /] /host=master/server-config=server-one/jvm=default:add-jvm-option(type="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n")      
{
    "outcome" => "failed",
    "failure-description" => {"host-failure-descriptions" => [("master" => "JBAS014746: jvm-option may not be null")]},
    "rolled-back" => true
}
[domain at localhost:9999 /] 

Solution:
In the class org.jboss.as.controller.descriptions.common.JVMDescriptions.java lines 185-187, replace

        node.get(REQUEST_PROPERTIES, TYPE, TYPE).set(ModelType.STRING);
        node.get(REQUEST_PROPERTIES, TYPE, DESCRIPTION).set(bundle.getString("jvm.option"));
        node.get(REQUEST_PROPERTIES, TYPE, REQUIRED).set(true);

with

        node.get(REQUEST_PROPERTIES, JVM_OPTION, TYPE).set(ModelType.STRING);
        node.get(REQUEST_PROPERTIES, JVM_OPTION, DESCRIPTION).set(bundle.getString("jvm.option"));
        node.get(REQUEST_PROPERTIES, JVM_OPTION, REQUIRED).set(true);

Note: if this helps, assign to me and I will issue a pull request.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list