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?
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.
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

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.