Alistair
04-27-2005, 05:40 AM
Can anyone recommend the best approach for using Spring's dependency injection for ServicedComponents?
My service tier is invoked from the web tier through .Net remoting over HTTP. The ServicedComponent classes that are invoked by IIS are wrappers around PONO objects. I would like to use Spring to provide the ServicedComponent with the actual implementation class it delegates to, and would also like to use Spring to manage dependencies within the PONO service objects themselves.
It appears I can setup an IApplicationContext within a singleton object and use Spring as an explicit factory from within the ServicedComponent and PONO classes. Is there a better way? Is there a way to have the dependencies injected automatically without explicitly managing IApplicationContext myself (like there is in ASP.Net through the PageHandlerFactory)?
Thanks
Alistair
My service tier is invoked from the web tier through .Net remoting over HTTP. The ServicedComponent classes that are invoked by IIS are wrappers around PONO objects. I would like to use Spring to provide the ServicedComponent with the actual implementation class it delegates to, and would also like to use Spring to manage dependencies within the PONO service objects themselves.
It appears I can setup an IApplicationContext within a singleton object and use Spring as an explicit factory from within the ServicedComponent and PONO classes. Is there a better way? Is there a way to have the dependencies injected automatically without explicitly managing IApplicationContext myself (like there is in ASP.Net through the PageHandlerFactory)?
Thanks
Alistair