[jboss-jira] [JBoss JIRA] Created: (JGRP-291) PullPushAdapter starts thread in constructor before listeners are registered
Steve Nicolai (JIRA)
jira-events at jboss.com
Wed Aug 30 17:49:44 EDT 2006
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
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