Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-395
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-395
Summary: Inefficiency: reverse the meaning of CayenneEvent "source" and "postedBy" properties
Type: Improvement
Status: Assigned
Priority: Major
Project: Cayenne
Components:
Cayenne Core Library
Fix Fors:
1.2 [DEV]
Versions:
1.2 [DEV]
Assignee: Andrus Adamchik
Reporter: Andrus Adamchik
Created: Mon, 17 Oct 2005 11:30 PM
Updated: Mon, 17 Oct 2005 11:30 PM
Description:
Meanings of CayenneEvent.source and CayenneEvent.postedBy are consistent across event posters (EventBridge, DataRowStore, and now - OPPChannel):
"source" means the ORIGIN of the event. I.e. if a DataRowStore sends an event about a commit in an ObjectContext, this ObjectContext (and not the DataRowStore) is set as source.
"postedBy" is usually the object that invoked "postEvent". In the example above it would be DataRowStore.
This seems ok, except that it makes the most common listener pattern used by ObjectContext and ObjectStore to work less efficiently. The pattern can be expressed as follows:
"source != myParent && postedBy == myParent"
The problem is that EventManager allows to register listeners by source but not by postedBy... So a listener can't just receieve "myParent" events. It will have to receive ALL events and then filter them manually.
Swapping the meaning of source and postedBy for the main event posters should address this.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Mon Oct 17 2005 - 23:30:40 EDT