[jboss-jira] [JBoss JIRA] Resolved: (JGRP-291) PullPushAdapter starts thread in constructor before listeners are registered
Bela Ban (JIRA)
jira-events at jboss.com
Thu Aug 31 07:16:18 EDT 2006
[ http://jira.jboss.com/jira/browse/JGRP-291?page=all ]
Bela Ban resolved JGRP-291.
---------------------------
Resolution: Done
> PullPushAdapter starts thread in constructor before listeners are registered
> ----------------------------------------------------------------------------
>
> Key: JGRP-291
> URL: http://jira.jboss.com/jira/browse/JGRP-291
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 2.3
> Environment: All
> Reporter: Steve Nicolai
> Assigned To: Bela Ban
> Fix For: 2.4
>
>
> The PullPushAdapter has the ability to multiplex based on a Serializable identifier. Unfortunately, all the constructors start the adaptor. This makes it very difficult to register listeners via registerListener(Serializable identifier, MessageListener l) before the adaptor is started. When a new node is joining an existing cluster that is actively sending messages, there is a race between getting the listeners registered and a message arriving.
> Suggested fix:
> Remove the call to start() from the constructors, allowing the PullPushAdaptor to be constructed, the listeners to be registered, then start() the adaptor. For example:
> a = new PullPushAdaptor(.....)
> a.registerListener("id1", ....)
> a.registerListener("id2", ....)
> a.start();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list