Application Server 7
  1. Application Server 7
  2. AS7-5343

SAR MBean attribute whose string attribute uses ${} are not replaced with sysprop values

    Details

    • Type: Feature Request Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Rejected
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JMX
    • Labels:
    • Similar Issues:
      Show 10 results 

      Description

      See the attached .sar as a test to replicate this - just deploy it in a 7.1.1.Final standalone/deployments directory and run it as explained below.

      This SAR has a String attribute. Its value is made up of some $

      {x} with some static text:

      <attribute name="MyStr">my.sys.prop=${my.sys.prop} jboss.home.dir=${jboss.home.dir} java.version=${java.version}</attribute>

      Start the AS7 server with the cmd line option "-Dmy.sys.prop=boo" (I also tried this with my.sys.prop=boo in a "my.properties" file and I passed in "-P my.properties" - same problem happens).

      When you look in the logs, the MBean will print out the value it gets in its setting method:

      15:19:41,448 INFO [stdout] (MSC service thread 1-5) STR attribute being set to=my.sys.prop=${my.sys.prop} jboss.home.dir=${jboss.home.dir} java.version=${java.version}

      Notice none of the ${x}

      tokens are replaced. Not even the JVM sysprop "java.version" - nor the JBoss "jboss.home.dir" - nor the one I passed into AS7 (my.sys.prop).

        Gliffy Diagrams

          Activity

          Hide
          John Mazzitelli added a comment -

          i'm looking at my previous code that ran on 4.2.3 and it looks it 4.2.3 also didn't replace the $

          {x}

          tokens (we have extra code to explicitly call the StringPropertyReplacer). So this isn't a backward compat issue. I will recategorize as an RFE.

          Show
          John Mazzitelli added a comment - i'm looking at my previous code that ran on 4.2.3 and it looks it 4.2.3 also didn't replace the $ {x} tokens (we have extra code to explicitly call the StringPropertyReplacer). So this isn't a backward compat issue. I will recategorize as an RFE.
          Hide
          Brian Stansberry added a comment -

          I removed the 7.1.1 Fix Version.

          Eduardo, when these files are parsed, please make sure that the string replacement uses the AS security vault as a possible source of replacement values. Our integration with jboss-metadata does that for the various EE deployment descriptors; something similar should be done for this.

          Show
          Brian Stansberry added a comment - I removed the 7.1.1 Fix Version. Eduardo, when these files are parsed, please make sure that the string replacement uses the AS security vault as a possible source of replacement values. Our integration with jboss-metadata does that for the various EE deployment descriptors; something similar should be done for this.
          Hide
          RH Bugzilla Integration added a comment -

          John Mazzitelli <mazz@redhat.com> made a comment on bug 851268

          I've got some notes on this port work found here on the wiki:

          https://docs.jboss.org/author/display/RHQ/Hosting+RHQ+Server+in+AS7

          Show
          RH Bugzilla Integration added a comment - John Mazzitelli <mazz@redhat.com> made a comment on bug 851268 I've got some notes on this port work found here on the wiki: https://docs.jboss.org/author/display/RHQ/Hosting+RHQ+Server+in+AS7
          Hide
          RH Bugzilla Integration added a comment -

          John Mazzitelli <mazz@redhat.com> made a comment on bug 851268

          removing all the external bug tracking links - the bugzilla integration to jira is not good:

          I will add "see also" links from this BZ to these:

          https://issues.jboss.org/browse/AS7-5342
          https://issues.jboss.org/browse/AS7-5336
          https://issues.jboss.org/browse/AS7-5321
          https://issues.jboss.org/browse/AS7-5177
          https://issues.jboss.org/browse/AS7-887
          https://issues.jboss.org/browse/AS7-3199

          Show
          RH Bugzilla Integration added a comment - John Mazzitelli <mazz@redhat.com> made a comment on bug 851268 removing all the external bug tracking links - the bugzilla integration to jira is not good: I will add "see also" links from this BZ to these: https://issues.jboss.org/browse/AS7-5342 https://issues.jboss.org/browse/AS7-5336 https://issues.jboss.org/browse/AS7-5321 https://issues.jboss.org/browse/AS7-5177 https://issues.jboss.org/browse/AS7-887 https://issues.jboss.org/browse/AS7-3199
          Hide
          Eduardo Martins added a comment -

          This was fixed by JBPAPP-8559.

          Show
          Eduardo Martins added a comment - This was fixed by JBPAPP-8559.

            People

            • Assignee:
              Eduardo Martins
              Reporter:
              John Mazzitelli
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development