I am having a unit of work class. When initialized a new proxy
instance for connecting to a remote repository gets injected. This
unit of work then does several tasks that form the unit of work to be
performed. This tasks do several things and some tasks connect to the
same remote repository. It would be more efficient if these tasks
could share the same proxy while in the scope of the unit-of-work. I
think that this is supported by Windsor but I have not found any
example on how to configure such scenario's.
For simplicity I mention a basic set of interfaces
IRepository<X>
ITaskA
ITaskB
IUnitOfWork
IStuffToDo : IUnitOfWork
{
DoSomeMagicResponse DoSomeMagic(DoSomeMagicRequest request);
}
classes:
RepositoryProxy : IRepository<X>
{
}
TaskA : ITaskA
{
IRepository<X> Repository;
}
TaskB: ITaskB
{
IRepository<X> Repository;
}
StuffToDo : IStuffToDo
{
IRepository<X> Repository;
Func<ITaskA> CreateA;
Func<ITaskB> CreateB;
}
Any help is appreciated.
--
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.