[MAGNOLIA-9198] Refactor ProviderImpl to gain access to the RepositoryContext Created: 30/Nov/23  Updated: 21/Dec/23  Resolved: 15/Dec/23

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0

Type: Task Priority: Neutral
Reporter: Michael Duerig Assignee: Michael Duerig
Resolution: Done Votes: 0
Labels: dx-core-6.3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MGNLUI-8612 FakeMagnoliaUI should register the de... Closed
is depended upon by MAGNOLIA-9181 Expose EventListenerMBean for monitoring Closed
is depended upon by MAGNOLIA-9183 Expose QueryStatManagerMBean for moni... Closed
is depended upon by MAGNOLIA-9184 Expose RepositoryStatistics for monit... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Collect Usage Metrics
Work Started:
Approved:
Yes

 Description   

As discovered in MAGNOLIA-9184, we need access to the RepositoryContext in order to register Jackrabbit's default MBeans with the MBean server.

Implementation notes

There's currently two proposals on how this could be implemented, both with their own pros and cons:

  1. PR1 specializes ProviderImpl into one that uses a different mechanism to get the repository, which provides access to the RepositoryContext.
  2. PR2 factors repository creation out into a RepositoryFactory, which provide the backward compatible implementation registering the repository with JNDI and the new one only providing access to the RepositoryContext.

1. is less risky as it does not touch the existing design and implementation much but it introduces some technical debt as we need to copy and slightly change a few classes from Jackrabbit (BindableMgnlRepository, BindableRepositoryFactory, RegistryHelper).

2. is more risky and reveals some tests that need fixing. There is a potential ripple effect of this causing similar test failures in other modules. Conceptually the approach is cleaner and introduces less technical debt.



 Comments   
Comment by Mikaël Geljić [ 06/Dec/23 ]

https://git.magnolia-cms.com/projects/PLATFORM/repos/main/pull-requests/1400/overview?commentId=124299

Generated at Mon Feb 12 04:39:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.