i'm workin on a greenfield project right now and i'm not sure how to
properly use the RRR pattern for transient objects. we're using event
sourcing, and here's one of the methods:
public T GetById(Guid id)
{
T instance = _factory.Create(id); // this is a typed factory
instance.Replay(GetEventsFor(id));
return instance;
}
so i guess the question is....who owns the object, and who releases
it? adding IRepository.Release() feels wrong. calling Dispose() on
the instance doesn't work unless i add some sort of
AutoReleaseInterceptor, which also feels wrong.
any ideas? thanks.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.