[MGNLUI-1145] The messaging subsystem is too much bound to the UI existence Created: 19/Apr/13  Updated: 23/Aug/13  Resolved: 29/Apr/13

Status: Closed
Project: Magnolia UI
Component/s: framework
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Bug Priority: Major
Reporter: Jozef Chocholacek Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-1793 Ensure session unlock when dealing wi... 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   

When I try to send a message from within a workflow (Script Task), I am occurring the following error:

java.lang.NullPointerException
	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.updateShellAppIndication(MagnoliaShell.java:172)
	at info.magnolia.ui.framework.shell.ShellImpl.updateShellAppIndication(ShellImpl.java:323)
	at info.magnolia.ui.admincentral.shellapp.pulse.message.PulseMessagesPresenter$2.messageSent(PulseMessagesPresenter.java:93)
	at info.magnolia.ui.framework.message.MessagesManagerImpl.sendMessageSentEvent(MessagesManagerImpl.java:170)
	at info.magnolia.ui.framework.message.MessagesManagerImpl.sendMessage(MessagesManagerImpl.java:104)
        ...

The locks should be removed.



 Comments   
Comment by Espen Jervidalo [ 25/Jun/13 ]

from the javadoc:
/**

  • Locks this session to protect its data from concurrent access. Accessing
  • the UI state from outside the normal request handling should always lock
  • the session and unlock it when done. To ensure that the lock is always
  • released, you should typically wrap the code in a <code>try</code> block
  • and unlock the session in <code>finally</code>:
  • <pre>
  • session.lock();
  • try { * doSomething(); * }

    finally

    { * session.unlock(); * }
  • </pre>
  • <p>
Comment by Aleksandr Pchelintcev [ 27/Jun/13 ]

Fixed in the related issue.

Comment by Jozef Chocholacek [ 28/Jun/13 ]

Marking "Resolved" as Sasha is on holidays.

Generated at Mon Feb 12 08:43:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.