[SPRNET-21] Event Wiring Prototype Source to Singleton Sink Does Nothing Created: 05/Jan/05  Updated: 05/Nov/08  Resolved: 01/Oct/07

Status: Resolved
Project: Spring.NET
Component/s: Spring-NET-CORE
Affects Version/s: 1.0 RC1
Fix Version/s: 2.0 M1

Type: Bug Priority: Minor
Reporter: Choy Rim Assignee: Mark Pollack
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicates SPRNET-41 Change event wiring mechanism Closed


If you use a prototype (as opposed to singleton) object as an event source to be wired to a singleton event sink, you get unintuitive results – it looks like nothing was wired. so the following configuration:

<object name="source" class="Source" singleton="false" />
<object name="sink" class="Sink">
<listener event="SomeEvent" method="OnSomeEvent">
<ref object="source" />

Intuitively you'd think that whenever you create a source, that sink will be automatically wired to it. Right now, that doesn't happen. We've got to either throw an exception or do the intuitive thing.

Comment by Choy Rim [ 05/Jan/05 ]

I forgot to change the priority. It's minor not major.

Comment by Choy Rim [ 19/Jan/05 ]

I've got an idea how to deal with this in an intuitive manner. We'll have a global subscription manager, an object responsible for maintaining the link between different id's in the container as well as actual instances of the id's.

During the config parsing stage, the object factory will add subscriptions to the subscription manager. During the "runtime" stage, when objects are created, the factory will check the subscription manager to determine with object instance events need to be wired up, and record the wiring (as a weak reference).

BTW, how do I figure out how to assign this bug to me?

Generated at Wed Oct 23 01:03:45 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.