[MGNLOBS-36] Unclosed sessions on CommandEventListener#onEvent failures Created: 01/Sep/15 Updated: 15/Apr/16 Resolved: 15/Sep/15 |
|
| Status: | Closed |
| Project: | Observation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.4 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Evzen Fochr | Assignee: | Evzen Fochr |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1d 20m | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| 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: | |||||||||||||
| Sprint: | Kromeriz 11 | ||||||||||||
| Story Points: | 2 | ||||||||||||
| Description |
|
When info.magnolia.module.observation.commands.CommandEventListener#onEvent fails during the execution, sessions are not closed properly. |
| Comments |
| Comment by Milan Divilek [ 07/Sep/15 ] |
|
Reopen: Fix release context when implementation of CommandEventListener is used, but if own implementation of javax.jcr.observation.EventListener is used then context is not released. See stacktrace in ticket description. |
| Comment by Evzen Fochr [ 10/Sep/15 ] |
|
Create integration test for more than one event. |
| Comment by Jan Haderka [ 11/Sep/15 ] |
|
Multiple things wrong with the test
|
| Comment by Jan Haderka [ 14/Sep/15 ] |
|
Looks better, but:
|
| Comment by Jan Haderka [ 15/Sep/15 ] |
|
After sleeping over it, I have one extra request for test: Don't mock the observer but have observation triggered through real event. So register proper observer on the repo and then make change in the repo to trigger first event and then second change to trigger the second event after first one have been processed. Why? Because we need lifetime long session to keep observation running, while now we are also closing sessions from within observers so we need to be sure that those are not the same sessions as well. |