[MAGNOLIA-4894] SimpleContext doesn't delegate getJCRSession method Created: 20/Feb/13  Updated: 07/Mar/13  Resolved: 07/Mar/13

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

Type: Bug Priority: Major
Reporter: Teresa Miyar Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File TestCommand.java     XML File config.modules.adminInterface.commands.default.test.xml     XML File config.modules.scheduler.config.jobs.test.xml    
Issue Links:
relation
is related to MGNLSCH-39 Add dependency to core to modul descr... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If we wrap context into SimpleContext then getJCRSession method fails on NPE because SimpleContext has no repository strategy. We need delegating getJCRSession methods into wrapped context.



 Comments   
Comment by Milan Divilek [ 27/Feb/13 ]

Why do you need to do this when core module already sets the same and scheduler depends on core?

Comment by Teresa Miyar [ 05/Mar/13 ]

Core module sets it, but scheduler still does not see it. To reproduce, create a command that reads some jcr content as any access to jcr content fails

Comment by Roman Kovařík [ 06/Mar/13 ]

Cannot reproduce on:

  • 4.4 with scheduler 1.4
  • 4.4.6 with scheduler 1.4.2
  • 4.4.10 with scheduler 1.4.4
  • 4.5.6 with scheduler 1.5.3
  • 4.5.8-SNAPSHOT with scheduler 1.5.5-SNAPSHOT

Retrieved System context is in all cases info.magnolia.context.JCRSessionPerThreadSystemContext.
It reflects setting of SystemContext from magnolia-core module descriptor, which is set to JCRSessionPerThreadSystemContext. (tested also with magnolia-core-4.5.8-SNAPSHOT with SingleJCRSessionSystemContext set, which was reflected in scheduler too).

If this issue will be successfully reproduced again, please reopen it and attach:

  1. list of all modules
  2. failing command
Comment by Teresa Miyar [ 07/Mar/13 ]

Sending command to reproduce problem

Comment by Teresa Miyar [ 07/Mar/13 ]

Magnolia 4.5.6
scheduler 1.5.3
standard 4.5.6 installation bundle.

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