Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2339

Repository Explorer should support the <context-param> approach for loading repositories

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 4.1.0.Final
    • 4.0.0.Final
    • Web Application
    • None

    Description

      With the changes for MODE-2304, it seems that the only way the Repository Web-Explorer can discover repositories is via:

       InitialContext ic = new InitialContext();
       ModeShapeEngine engine = (ModeShapeEngine) ic.lookup("jcr");
      

      This works fine OOTB for the WF subsystem (where this binding is done automatically behind the scenes) but it extremely limiting in all other cases because:
      a) users need to run with a JNDI RW environment
      b) they need to make the above binding themselves

      We need to make sure the context-param discovery approach works as well, meaning that users should be able to add to their web.xml either:

          <context-param>
              <param-name>org.modeshape.jcr.URL</param-name>
              <param-value>jndi:jcr</param-value>
          </context-param>    
      

      or

          <context-param>
              <param-name>org.modeshape.jcr.URL</param-name>
              <param-value>file:/repo-config.json</param-value>
          </context-param>    
      

      We should also update the default web.xml from the modeshape-web-explorer-war module to contain both the above approaches but commented out & documented, so that it's obvious how one can use this configuration.
      Since this most likely means using the ModeShapeJcrDeployer context listener, this should be part (by default) of the modeshape-explorer web-fragment.xml and we should make sure it works correctly even when none of the above context params are provided (i.e. it doesn't crash).

      Attachments

        Issue Links

          Activity

            People

              oleg.kulikov Oleg Kulikov (Inactive)
              hchiorean Horia Chiorean (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: