Sling
  1. Sling
  2. SLING-2352

Move out the repository RegistrationSupport support logic to a different bundle

    Details

      Description

      We have a usecase where we want to embed the Sling based war within an existing ear. In that mode we want to expose the repository instance registered by a different bundle (other than org.apache.sling.jcr.jackrabbit.server bundle) into the JNDI so that code within the ear can access the repository in InVM mode

      Currently the Repository registration support logic is part of org.apache.sling.jcr.jackrabbit.server bundle. However this bundle is also responsible for creating and registering the Jackrabbit repository instance.

      Attached is a patch which refactors the registration logic into a different bundle.

      Points to note regarding patch
      1. The RmiRegistrationSupport has been retained in the Jackrabbit Server Bundle due to its dependency on the Jackrabbit classes
      2. The AbstractRegistrationSupport has been moved to a different package and part of exported package now and is now imported by JR Server bundle. This is done to support #1 above
      3. The component names have been retained for backward compatibility support for configuration

        Activity

        Hide
        Chetan Mehrotra added a comment -

        Repository Registrar bundle

        Show
        Chetan Mehrotra added a comment - Repository Registrar bundle
        Hide
        Felix Meschberger added a comment -

        This makes perfect sense to me.

        Thanks for providing the patch. I will look into it and apply it ASAP.

        Show
        Felix Meschberger added a comment - This makes perfect sense to me. Thanks for providing the patch. I will look into it and apply it ASAP.
        Hide
        Chetan Mehrotra added a comment -

        Hi Felix,

        Were you able to look into this issue?

        Show
        Chetan Mehrotra added a comment - Hi Felix, Were you able to look into this issue?
        Hide
        Chetan Mehrotra added a comment -

        Hi Felix,

        Were you able to look into this issue?

        Show
        Chetan Mehrotra added a comment - Hi Felix, Were you able to look into this issue?
        Hide
        Felix Meschberger added a comment -

        Will not directly apply the patch. Rather I use it as a guideline.

        Intended tasks:

        • Create new project structure, calling it o.a.s.jcr.registration
        • Will "svn move" the *RegistrationSupport classes (incl. RMI)
        • Will embed the Jackrabbit Dummy InitialContextFactory (default config)
        • Will dynamically import any class to support configuring any InitialContextFactory
        • Will "svn copy" and edit the metatype properties

        Using svn move and svn copy allows to keep the revision history linked to the new files

        Created initial project structure in Rev. 1333012

        Re. InitialContextFactory: Alternatively we might leverage OSGi JNDI support ...

        Show
        Felix Meschberger added a comment - Will not directly apply the patch. Rather I use it as a guideline. Intended tasks: Create new project structure, calling it o.a.s.jcr.registration Will "svn move" the *RegistrationSupport classes (incl. RMI) Will embed the Jackrabbit Dummy InitialContextFactory (default config) Will dynamically import any class to support configuring any InitialContextFactory Will "svn copy" and edit the metatype properties Using svn move and svn copy allows to keep the revision history linked to the new files Created initial project structure in Rev. 1333012 Re. InitialContextFactory: Alternatively we might leverage OSGi JNDI support ...
        Hide
        Felix Meschberger added a comment -

        Completed repository registration bundle in Rev. 1333033 and committed removal of registration support classes from the server bundle in Rev. 1333035

        Finally added the new bundle to the reactor in Rev. 1333038 and added to the launchpad/builder bundle list in Rev. 1333037

        Show
        Felix Meschberger added a comment - Completed repository registration bundle in Rev. 1333033 and committed removal of registration support classes from the server bundle in Rev. 1333035 Finally added the new bundle to the reactor in Rev. 1333038 and added to the launchpad/builder bundle list in Rev. 1333037
        Hide
        Felix Meschberger added a comment -

        Everything done and closing...

        Show
        Felix Meschberger added a comment - Everything done and closing...
        Hide
        Felix Meschberger added a comment -

        Closing after release of Jackrabbit Server 2.1.2 bundle

        Show
        Felix Meschberger added a comment - Closing after release of Jackrabbit Server 2.1.2 bundle

          People

          • Assignee:
            Felix Meschberger
            Reporter:
            Chetan Mehrotra
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development