JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-4800

NotificationManager should skip duplicate registrations with a warning

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 3.0.0-M1
  • Fix Version/s: ITR30, 3.0.0-M2
  • Component/s: Core: Lifecycle
  • Labels:
    None
  • User impact:
    Medium
  • Similar Issues:
    None

Description

A duplicate registration is when the exact same instance is registered twice:

MyListener listener = new MyListener();
muleContext.registerListener(listener);
muleContext.registerListener(listener);

This should result in listener being invoked once and not twice as it is currently, for the notification it is listening to.

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MULE-4796 CxfServiceComponent services are initialized/started twice because of duplicate notifications

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. MULE-4808 NotificationsListeners registered before xml configuration is parsed end up being registered twice.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Andrew Perepelytsya added a comment - 19/Mar/10 09:22 AM

Dan, could you please provide more context when filing issues? What is considered a duplicate registration? How do you define uniqueness?

Show
Andrew Perepelytsya added a comment - 19/Mar/10 09:22 AM Dan, could you please provide more context when filing issues? What is considered a duplicate registration? How do you define uniqueness?
Daniel Feist made changes - 19/Mar/10 09:38 AM
Field Original Value New Value
Description A duplicate registration is when the exact same instance is registered twice:

MyListener listener = new MyListener();
muleContext.registerListener(listener);
muleContext.registerListener(listener);
Daniel Feist made changes - 19/Mar/10 09:42 AM
Link This issue relates to MULE-4796 [ MULE-4796 ]
Daniel Feist made changes - 19/Mar/10 09:43 AM
Description A duplicate registration is when the exact same instance is registered twice:

MyListener listener = new MyListener();
muleContext.registerListener(listener);
muleContext.registerListener(listener);
A duplicate registration is when the exact same instance is registered twice:

MyListener listener = new MyListener();
muleContext.registerListener(listener);
muleContext.registerListener(listener);

This should result in {{listener}} being invoked once and not twice as it is currently, for the notification it is listening to.
Daniel Feist made changes - 19/Mar/10 10:55 AM
Fix Version/s Tech. Debt [ 10572 ]
Priority To be reviewed [ 6 ] Minor [ 4 ]
Hide
Permalink
Dirk Olmes added a comment - 20/Mar/10 01:32 AM

See the issue's description. Registring the same object as listener should warn and do not perform the registration twice.

I'd do the comparison using equals and not by checking with ==.

Show
Dirk Olmes added a comment - 20/Mar/10 01:32 AM See the issue's description. Registring the same object as listener should warn and do not perform the registration twice. I'd do the comparison using equals and not by checking with ==.
Hide
Permalink
Daniel Feist added a comment - 21/Mar/10 09:11 AM

I agree about using equals. Having thought about it a but more i think notification listener uniqueness should also include the subscription, as you may want to register the same listener with different subscriptions.

The implementation of this is in fact very easy; just implement equals in ListenerSubscriptionPair.

Show
Daniel Feist added a comment - 21/Mar/10 09:11 AM I agree about using equals. Having thought about it a but more i think notification listener uniqueness should also include the subscription, as you may want to register the same listener with different subscriptions. The implementation of this is in fact very easy; just implement equals in ListenerSubscriptionPair.
Daniel Feist made changes - 21/Mar/10 09:25 PM
Assignee Daniel Feist [ dfeist ]
Hide
Permalink
Daniel Feist added a comment - 21/Mar/10 09:27 PM

3.x: http://svn.mule.codehaus.org/changelog/mule/branches/mule-3.x?cs=16879

Show
Daniel Feist added a comment - 21/Mar/10 09:27 PM 3.x: http://svn.mule.codehaus.org/changelog/mule/branches/mule-3.x?cs=16879
Daniel Feist made changes - 21/Mar/10 09:28 PM
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 3.0.0-M2 [ 10653 ]
Fix Version/s Tech. Debt [ 10572 ]
Resolution Fixed [ 1 ]
Daniel Feist made changes - 22/Mar/10 07:55 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Daniel Feist made changes - 22/Mar/10 07:56 AM
Status Reopened [ 4 ] Closed [ 6 ]
Fix Version/s ITR30 [ 10815 ]
Resolution Fixed [ 1 ]
Daniel Feist made changes - 26/Mar/10 05:21 PM
Link This issue relates to MULE-4808 [ MULE-4808 ]
Transition Time In Source Status Execution Times Last Executer Last Execution Date
Open Open Closed Closed
2d 12h 9m 1 Daniel Feist 21/Mar/10 09:28 PM
Closed Closed Reopened Reopened
10h 27m 1 Daniel Feist 22/Mar/10 07:55 AM
Reopened Reopened Closed Closed
19s 1 Daniel Feist 22/Mar/10 07:56 AM
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
  • Repository mule on http://foo.bar/ failed: Error in remote call to 'FishEye 0 (http://foo.bar/)' (http://foo.bar) [AbstractRestCommand{path='/rest-service-fe/changeset-v1/listChangesets/', params={expand=changesets[-21:-1].revisions[0:29], comment=MULE-4800, p4JobFixed=MULE-4800, rep=mule}, methodType=GET}] : java.net.UnknownHostException: foo.bar

People

  • Assignee:
    Daniel Feist
    Reporter:
    Daniel Feist
Vote (0)
Watch (0)

Dates

  • Created:
    19/Mar/10 09:18 AM
    Updated:
    26/Mar/10 05:21 PM
    Resolved:
    22/Mar/10 07:56 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.