Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-1694

System properties does not get replaced in a Cluster configuration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: core 1.4.5
    • Fix Version/s: 1.5
    • Component/s: config
    • Labels:
      None

      Description

      Since JCR-1304 has been added to jackrabbit 1.4 I guess this should be reported as a bug...

      Still not debugged deeply, but if I try to configure a Cluster using:
      <Cluster id="$

      {server}" syncDelay="10">

      after setting a "server" system property I expect to have the cluster initialized properly using the value of such property... I just realized that my cluster node gets initialized with the final value of "${server}

      " instead

      Cluster config is a very good place where to use system properties, since all the configuration is usually identical between cluster nodes while the "id" property must be different...

      Is there anything I missed/did wrong in my configuration?

      1. JCR-1694-testcase.diff
        10 kB
        fabrizio giustina
      2. JCR-1694-fix.diff
        11 kB
        fabrizio giustina

        Issue Links

          Activity

          Hide
          fabrizio giustina added a comment -

          failing testcase

          Show
          fabrizio giustina added a comment - failing testcase
          Hide
          fabrizio giustina added a comment -

          testcase + fix for parsing system properties in cluster "id" and "syncDelay" properties

          Show
          fabrizio giustina added a comment - testcase + fix for parsing system properties in cluster "id" and "syncDelay" properties
          Hide
          fabrizio giustina added a comment -

          (if the patch looks good it would be great to have it merged to the 1.4 branch for the upcoming 1.4.6 release, thanks)

          Show
          fabrizio giustina added a comment - (if the patch looks good it would be great to have it merged to the 1.4 branch for the upcoming 1.4.6 release, thanks)
          Hide
          Alexander Klimetschek added a comment -

          For clustering, you can set the system property "org.apache.jackrabbit.core.cluster.node_id" instead of setting the id attribute in the Cluster config element. See http://wiki.apache.org/jackrabbit/Clustering.

          We could have multiple ways of setting the id dynamically, but I would prefer to have only one way of doing this in this case. WDYT?

          Show
          Alexander Klimetschek added a comment - For clustering, you can set the system property "org.apache.jackrabbit.core.cluster.node_id" instead of setting the id attribute in the Cluster config element. See http://wiki.apache.org/jackrabbit/Clustering . We could have multiple ways of setting the id dynamically, but I would prefer to have only one way of doing this in this case. WDYT?
          Hide
          fabrizio giustina added a comment -

          I wasn't aware of the org.apache.jackrabbit.core.cluster.node_id "magic" property, but since you can use system variables everywhere in the config file with a standard mechanism (except here, at the moment) IMHO it would be better to handle it consistently.
          Since it's more generic I think the way system properties are replaced using $

          {variables}

          is easier and more self-explanatory. This could also fully replace the "org.apache.jackrabbit.core.cluster.node_id" property, by just setting the default to $

          {org.apache.jackrabbit.core.cluster.node_id}

          . My vote to add the generic replacement of variables in the cluster config too.

          Show
          fabrizio giustina added a comment - I wasn't aware of the org.apache.jackrabbit.core.cluster.node_id "magic" property, but since you can use system variables everywhere in the config file with a standard mechanism (except here, at the moment) IMHO it would be better to handle it consistently. Since it's more generic I think the way system properties are replaced using $ {variables} is easier and more self-explanatory. This could also fully replace the "org.apache.jackrabbit.core.cluster.node_id" property, by just setting the default to $ {org.apache.jackrabbit.core.cluster.node_id} . My vote to add the generic replacement of variables in the cluster config too.
          Hide
          Dominique Pfister added a comment -

          Fixed in revision 695766.

          Show
          Dominique Pfister added a comment - Fixed in revision 695766.
          Hide
          Jukka Zitting added a comment -

          I considered merging this to the 1.4 branch, but decided otherwise since this change affects the configuration settings. Better to leave this for 1.5.

          Show
          Jukka Zitting added a comment - I considered merging this to the 1.4 branch, but decided otherwise since this change affects the configuration settings. Better to leave this for 1.5.

            People

            • Assignee:
              Dominique Pfister
              Reporter:
              fabrizio giustina
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development