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

Create a mechanism allowing Jackrabbit to automatically install custom nodes when it creates a repository

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: config
    • Labels:
      None

      Description

      The current process for adding new nodes requires clients to open a new session, get a session, then a workspace, then the Jackrabbit implementation of a NodeTypeManager where the Jackrabbit NodeTypeDef objects can be added. However, custom node types need only be added once, preferably when the repository is created/initialized, as this is the most appropriate time for such actions. The alternatives for clients wishing to install custom node types include:

      • configuring an object to run when their app is deployed or started; this method may be dependent on the environment and may not be portable
      • checking to see if custom node types exist whenever they go to access the repository; this degrades performance

      A better alternative would be to allow Jackrabbit to add the custom node types when it creates a repository. This could be accomplished by either adding an element to the repository configuration XML file. In one scenario, the element specifies the location of the custom node file and the class of the node type reader used to process the file. In another scenario, the element specifies the name of a class and a method to call on that class that will initialize the repository. In my mind, the first scenario seems like a better solution. While it is no more portable than a custom initialization object invoked by the environment, it has the benefit of not being non-portable code.

      I would be happy to code up the first scenario (location of custom node file and a reader class) if it is an appropriate improvement to the system.

        Activity

        Mark Slater created issue -
        Mark Slater made changes -
        Field Original Value New Value
        Attachment customNodeTypeReaderConfig.patch [ 12323221 ]
        Jukka Zitting made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Jukka Zitting [ jukkaz ]
        Resolution Won't Fix [ 2 ]
        Jukka Zitting made changes -
        Workflow jira [ 12347300 ] no-reopen-closed, patch-avail [ 12468107 ]
        Jukka Zitting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jukka Zitting
            Reporter:
            Mark Slater
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development