0 Replies Latest reply on May 22, 2014 12:50 PM by Daniel Nuss

    Get resolved expression value in cli

    Daniel Nuss Newbie

      Hi,

       

      i just want to pass in an expression value for my different servers in domain mode for the messaging attribute "backup-group-name". I define it in one of my slave hosts like this:

      <server name="my-server" group="my-server-group" >
      <system-properties>
          <property name="jboss.messaging.hornetq.backupgroup" value="myvalue"/>
      </system-properties>
      </server>
      

       

      and reference it in my domain.xml of my domain controller like this:

      <hornetq-server>
      ...
      <backup-group-name>${jboss.messaging.hornetq.backupgroup}</backup-group-name>
      ...
      </hornetq-server>
      

       

       

      I see that this value is set when my server starts:

       

      ....
      jboss.messaging.hornetq.backupgroup = myvalue
      ...
      

       

      Now i just wanted to evaluate whether the expression is correctly resolved in cli, but i can't get it right. For a start, i tried to use resolve it with the following command:

      /:resolve-expression-on-domain(expression=${jboss.messaging.hornetq.backupgroup})

       

      but then i just get the following result:

       

      {
          "outcome" => "success",
          "result" => undefined,
          "server-groups" => {
              "main-server-group" => {"host" => {"master" => {"server-one" => {"response" => {
                  "outcome" => "success",
                  "result" => "$"
              }}}}},
              "my-server-group" => {"host" => {"my-host-controller" => {"my-server" => {"response" => {
                  "outcome" => "success",
                  "result" => "$"
              }}}}}
          }
      }
      

       

      But the expression should be supported here, as far as i see from executing /profile=full-ha/subsystem=messaging/hornetq-server=default/:read-resource-description:

       

      "backup-group-name" => {
          "type" => STRING,
          "description" => "Der Name eines Satzes von live/backups, die miteinander replizieren sollten",
          "expressions-allowed" => true,
          "nillable" => true,
          "min-length" => 1L,
          "max-length" => 2147483647L,
          "access-type" => "read-write",
          "storage" => "configuration",
          "restart-required" => "all-services"
      }
      

       

       

      So i just don't get it: how can i show the resolved value, or am i still doing sth. wrong? Isn't there a way to resolve the expression directly on my messaging node on the concrete server? (because when i try to get the values there, i just get the expression itself...)