Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-99

System properties will not be seen in runtime if I removed and then add it in batch with CLI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.0.0.DR4
    • 6.1.0.GA, 6.2.0.GA, 6.3.0.GA
    • Management
    • Workaround Exists
    • Hide

      Don't use:
      /system-property=bar:add(value=test1)
      batch
      /system-property=bar:remove()
      /system-property=bar:add(value=test2)
      run-batch
      -------------------------------------------------------------
      But to use:
      /system-property=bar:add(value=test1)
      /system-property=bar:write-attribute(name=value,value=test2)

      Show
      Don't use: /system-property=bar:add(value=test1) batch /system-property=bar:remove() /system-property=bar:add(value=test2) run-batch ------------------------------------------------------------- But to use: /system-property=bar:add(value=test1) /system-property=bar:write-attribute(name=value,value=test2)
    • Hide

      /system-property=bar:add(value=test1)
      batch
      /system-property=bar:remove()
      /system-property=bar:add(value=test2)
      run-batch
      ----------------------------------------
      We can check it by:
      /system-property=bar:read-resource
      Results in:
      {
      "outcome" => "success",
      "result" =>

      {"value" => "test2"}

      }
      ----------------------------------------
      But in Runtime, the system-property "bar" is not seen:
      /core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)

      1. no "bar" in response

      In standalone.xml "bar" exists:
      <system-properties>
      <property name="bar" value="test2"/>
      </system-properties>

      Finally, the deployed application can't access "bar" via: System.getProperty("bar")

      1. returns null
      Show
      /system-property=bar:add(value=test1) batch /system-property=bar:remove() /system-property=bar:add(value=test2) run-batch ---------------------------------------- We can check it by: /system-property=bar:read-resource Results in: { "outcome" => "success", "result" => {"value" => "test2"} } ---------------------------------------- But in Runtime, the system-property "bar" is not seen: /core-service=platform-mbean/type=runtime:read-attribute(name=system-properties) no "bar" in response In standalone.xml "bar" exists: <system-properties> <property name="bar" value="test2"/> </system-properties> Finally, the deployed application can't access "bar" via: System.getProperty("bar") returns null

      If I removed and then added the SAME system property in batch with CLI, this property will not be seen/used in runtime.

              ehugonne1@redhat.com Emmanuel Hugonnet
              zhangxu1324_jira xu zhang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: