Bug 869012 - LocalTaskService don't remove listeners
Summary: LocalTaskService don't remove listeners
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER4
: BRMS 5.3.1 GA
Assignee: Kris Verlaenen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-22 18:33 UTC by Alessandro Lazarotti
Modified: 2025-02-10 03:20 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:20:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPM-3578 0 Major Resolved LocalTaskService don't remove listeners 2013-07-10 13:46:28 UTC

Description Alessandro Lazarotti 2012-10-22 18:33:02 UTC
LocalTaskService don't remove the listeners that are created in:

  public void registerForEvent(EventKey key, boolean remove, EventResponseHandler responseHandler) {
    SimpleEventTransport transport =
        new SimpleEventTransport(taskServiceSession, responseHandler, remove);
    taskServiceSession.getService().getEventKeys().register(key, transport);
  }


Notice that a client of this method can't remove it later, becouse the method return void.


This method is called by SyncWSHumanTaskHandler.connect()


 private void registerTaskEvents() {
 TaskCompletedHandler eventResponseHandler = new TaskCompletedHandler();
        TaskEventKey key = new TaskEventKey(TaskCompletedEvent.class, -1);
        client.registerForEvent(key, false, eventResponseHandler);
        key = new TaskEventKey(TaskFailedEvent.class, -1);
        client.registerForEvent(key, false, eventResponseHandler);
        key = new TaskEventKey(TaskSkippedEvent.class, -1);
        client.registerForEvent(key, false, eventResponseHandler);
    }
 

See that the listeners aren't save to remove later. If don't remove the listeners, they are invoked later.

PS: This can generate "Illegal method call. This session was previously disposed" - when a task is to be completed.

Comment 2 Maciej Swiderski 2012-10-24 17:52:56 UTC
fix backported to branch 5.2.x

Comment 3 lcarlon 2012-10-25 23:38:32 UTC
This issue has been marked as requires_doc_text, however, no text has been provided. Please provide the text so it can be added to the release notes document, or set the requires_doc_text flag to '-'.

Thanks
Lee

Comment 4 lcarlon 2012-11-05 05:31:01 UTC
Hi Maciej,

Thanks for providing the doc text. I've edited it for the release notes document. Do you mind taking a quick look to make sure I didn't garble the meaning in the edit.

Thanks
Lee

Comment 5 Maciej Swiderski 2012-11-05 05:40:58 UTC
Lee, it's perfect

Comment 6 Marek Winkler 2012-11-13 16:23:05 UTC
Verified on 5.3.1.BRMS-ER4.

Comment 7 Tim Schade 2013-06-20 13:09:06 UTC
Hi,
we encounter this issue in version 5.4.0.FINAL.

Is the fix included in this version?

Comment 15 Red Hat Bugzilla 2025-02-10 03:20:59 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.