Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3660

Refine 'connected' state of a (vlt) repository, cache node types after disconnection properly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Sling Eclipse IDE 1.0.0
    • IDE
    • None

    Description

      Currently the ServerUtil.getDefaultRepository always returns a valid repository with which you can do getNodeTypeRegistry() and that in turn connects to the server and loads the node types. This seemed convenient.

      But the problem is, it doesn't give the user any control when to connect to the server and when not. And it will result in connection errors at places where the user maybe didn't intend or know that a connection would be done.

      Hence a new, simpler schema:

      • when the server is stopped, no 'repository connection' is being established, including for the node type registry
        • hence, with a stopped server, the node type registry can be null - hence some actions require adjustments for that situation
      • when the server is started ('connected to'), the repository is connected and the node type registry loaded
        • at this stage the node type registry can be used for various actions, including code completion, property type display
      • when the server is stopped again, the node type registry is cached and still provided to the various actions (without any server interaction going on though)

      This should be more intuitive and make initial content-browsing in 'offline mode' simpler

      Attachments

        Activity

          People

            stefanegli Stefan Egli
            stefanegli Stefan Egli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: