Sling
  1. Sling
  2. SLING-2225

Improve support for embedding the Sling Launcher in Java applications

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Launchpad Base 2.3.0
    • Fix Version/s: Launchpad Base 2.4.0
    • Component/s: Launchpad
    • Labels:
      None

      Description

      The only way to embed the Sling launcher today is to build an array of command line options and call the static Main.main(String[] args) method from the application. This is kind of weird and only allows a small subset of configuration properties to be easily supplied by the calling application.

      In addition the handling of command line options is currently split between the Main and the MainDelagate class: The Main class implements the usage functionality (for the -h command line option) while the MainDelegate class implements the actual conversion of command line options to internal configuration property. This should be improved in that the support for real command lines should be consolidated in the Main class and the map of configuration properties supplied to the MainDelagate class should only contain actual configuration properties.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        17h 34m 1 Felix Meschberger 19/Sep/11 13:42
        Resolved Resolved Closed Closed
        242d 10h 32m 1 Felix Meschberger 19/May/12 00:14
        Gavin made changes -
        Workflow re-open possible,doc-test-required [ 12788524 ] no-reopen-closed,doc-test-required [ 12793003 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12766578 ] re-open possible,doc-test-required [ 12788524 ]
        Gavin made changes -
        Workflow Copy of no-reopen-closed,doc-test-required [ 12762806 ] no-reopen-closed,doc-test-required [ 12766578 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12633506 ] Copy of no-reopen-closed,doc-test-required [ 12762806 ]
        Felix Meschberger made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Felix Meschberger added a comment -

        Close after release.

        Show
        Felix Meschberger added a comment - Close after release.
        Felix Meschberger made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Felix Meschberger added a comment -

        A few more fixes and finetuning applied.

        Plus added documentation ("Embedding the Standalone Java Application") to the Sling Site page http://sling.apache.org/site/embedding-sling.html

        Show
        Felix Meschberger added a comment - A few more fixes and finetuning applied. Plus added documentation ("Embedding the Standalone Java Application") to the Sling Site page http://sling.apache.org/site/embedding-sling.html
        Hide
        Felix Meschberger added a comment -

        Implemented improvements in Rev. 1172508. The Main class now has an officially extensible API:

        Main(Map<String, String> properties) – creates the Main class with configuration properties
        doControlCommand() – handles the start, stop, and status command line options
        (reflected as sling.control.action configuration property in the constructor)
        doStart() – start Sling
        doStop() – stop Sling

        The main(String[] args) method still is present for the Java VM to start Sling. It is in this method, that documented command line options are parsed and converted into a map of properties to be used for the actual Sling startup.

        Show
        Felix Meschberger added a comment - Implemented improvements in Rev. 1172508. The Main class now has an officially extensible API: Main(Map<String, String> properties) – creates the Main class with configuration properties doControlCommand() – handles the start, stop, and status command line options (reflected as sling.control.action configuration property in the constructor) doStart() – start Sling doStop() – stop Sling The main(String[] args) method still is present for the Java VM to start Sling. It is in this method, that documented command line options are parsed and converted into a map of properties to be used for the actual Sling startup.
        Felix Meschberger created issue -

          People

          • Assignee:
            Felix Meschberger
            Reporter:
            Felix Meschberger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development