|
From: Michael Y. <yo...@gm...> - 2006-06-25 22:58:47
|
I personally think the most intuitive approach is to use <aop:scoped-proxy/>. Scoped-proxy provides this very functionality for request and session beans. I think it should extended into prototype and singleton beans. The trick is the proxy needs to be able to obtain access to an applicable application context after being serialized. I created an issue to hopefully address this missing bit of functionality. http://opensource.atlassian.com/projects/spring/browse/SPR-2121 In the issue I put forth the idea of possibly being able to optionally provide a BeanFactoryLocator to the scoped-proxy so that singleton and prototype proxies will know where to obtain a reference from a valid BeanFactory even after serialization. I hope to try and provide a patch in a couple of weeks. Mike |