This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-662a6632-de9b-479a-99c4-b2904d356db9 XWIKI-22955 Open

DefaultNotificationCacheManager shouldn't rely on a document configuration source

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c2ddd566-a895-422f-85b0-cfa2483f9416 Simon Urli created this issue on 06/Mar/25 09:28
 
Summary: DefaultNotificationCacheManager shouldn't rely on a document configuration source
Issue Type: cid:jira-generated-image-avatar-662a6632-de9b-479a-99c4-b2904d356db9 Bug
Affects Versions: 16.1.0
Assignee: Unassigned
Components: Notifications
Created: 06/Mar/25 09:28
Priority: cid:jira-generated-image-static-major-c27ae663-1e48-4606-a9cd-fdc8014636c8 Major
Reporter: Simon Urli
Description:

As exposed in XWIKI-22954 right now DefaultNotificationCacheManager injects DefaultNotificationConfiguration which relies on DefaultConfigurationSource. That later uses 2 sources of configuration: the xwiki.properties and the document configuration source.

The problem is that DefaultNotificationCacheManager is initialized globally for the farm since the extension is installed at farm level, so it doesn't make sense that it reads value from a specific wiki document. Especially since the wiki where it reads the value depends on how it's initialized: e.g. an event triggered on a specific wiki might initialize it with wrong values.