[MGNLGROOVY-66] Support using JCR session within Groovy console Created: 28/Jan/13  Updated: 11/Oct/13  Resolved: 09/Jul/13

Status: Closed
Project: Magnolia Groovy Module
Component/s: None
Affects Version/s: 1.2.4
Fix Version/s: 1.2.6

Type: Improvement Priority: Neutral
Reporter: Jaroslav Simak Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLGROOVY-75 CLONE - Support using JCR session wit... Closed
is cloned by MGNLGROOVY-77 Support using JCR session within Groo... Closed
causality
is causing MGNLGROOVY-80 Navigating node hierarchy with dot no... Closed
relation
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)
Date of First Response:

 Description   

Right now it is not possible to use JCR session directly, Repository exception is thrown. See code below.

Welcome to the Magnolia Groovy Interactive Console! Type 'help' for more info and a list of available commands. [Using Groovy version 1.7.10].
mgnl> s = ctx.getJCRSession("website")
===>
session-admin-905
mgnl> s.getNode("/")
RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed.
mgnl>


 Comments   
Comment by Jan Haderka [ 18/Jun/13 ]

Port to 1.3.x is missing. Also exception handling in the new class is not enough and needs to be improved.

Comment by Ondrej Chytil [ 18/Jun/13 ]

1.3.x branch was unused relict from M5 development (M5 is currently using master version 2.0) and was deleted.

Comment by Jan Haderka [ 08/Jul/13 ]

Sorry to reopen this again, but in your fix you introduce wrapper that extends ChildWrappingNodeWrapper that is deprecated (because it's buggy and allows escaping of the unwrapped nodes). You should extend ContentDecoratorNodeWrapper instead.

Generated at Mon Feb 12 05:55:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.