Synapse
  1. Synapse
  2. SYNAPSE-302

Reduce dependence on System properties

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: NIGHTLY
    • Fix Version/s: 1.2
    • Component/s: Core
    • Labels:
      None

      Description

      As per http://marc.info/?l=synapse-dev&m=121030348512674&w=2

      Synapse has heavily used System properties within many places of the code.. and to make Synapse more embeddable and behave better within an application server (WAR container), its better to avoid depending on system properties.

        Activity

        Hide
        Asankha C. Perera added a comment -

        Made the 5th argument (Resolve root) optional, and made it to default to the SYNAPSE_HOME + Fil.separator + "repository" - since with a default Synapse installation, we typically keep resources under repository/conf/sample/resources etc..

        I think we can close this now?

        Show
        Asankha C. Perera added a comment - Made the 5th argument (Resolve root) optional, and made it to default to the SYNAPSE_HOME + Fil.separator + "repository" - since with a default Synapse installation, we typically keep resources under repository/conf/sample/resources etc.. I think we can close this now?
        Hide
        Andreas Veithen added a comment -

        I modified SynapseServer so that the old way of starting it (one argument + system properties) is still supported. Indeed, if the first thing users have to do after upgrading to Synapse 1.2 is to change all their custom scripts, Eclipse launch configurations, etc., they will not be very happy. SynapseServer now issues a warning message when used in this "compatibility mode". We should support this at least for release 1.2 and remove it in 1.3.

        Also, I don't like the resolve root as mandatory fifth argument. Indeed this setting is only used by WSDLEndpointFactory and even there it is not considered as mandatory. I commented the check in ServerManager#validate so that when starting SynapseServer the old way it doesn't complain. I think we should find a better way to provide this setting to WSDLEndpointFactory, maybe by allowing the user to specify it synapse.xml or by making it an optional argument to SynapseServer.

        Show
        Andreas Veithen added a comment - I modified SynapseServer so that the old way of starting it (one argument + system properties) is still supported. Indeed, if the first thing users have to do after upgrading to Synapse 1.2 is to change all their custom scripts, Eclipse launch configurations, etc., they will not be very happy. SynapseServer now issues a warning message when used in this "compatibility mode". We should support this at least for release 1.2 and remove it in 1.3. Also, I don't like the resolve root as mandatory fifth argument. Indeed this setting is only used by WSDLEndpointFactory and even there it is not considered as mandatory. I commented the check in ServerManager#validate so that when starting SynapseServer the old way it doesn't complain. I think we should find a better way to provide this setting to WSDLEndpointFactory, maybe by allowing the user to specify it synapse.xml or by making it an optional argument to SynapseServer.
        Hide
        Asankha C. Perera added a comment -

        The ServerManager now requires the

        • axis2 repository
        • axis2.xml path
        • synapse home
        • synapse.xml path
        • resolve root
          as parameters to start Synapse.

        All unwanted uses of system properties have been removed from the core module

        TODO: Need to test on Windows (including running samples)

        Show
        Asankha C. Perera added a comment - The ServerManager now requires the axis2 repository axis2.xml path synapse home synapse.xml path resolve root as parameters to start Synapse. All unwanted uses of system properties have been removed from the core module TODO: Need to test on Windows (including running samples)

          People

          • Assignee:
            Asankha C. Perera
            Reporter:
            Asankha C. Perera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development