|
From: <jue...@we...> - 2003-12-03 12:26:53
|
Actually, that's *not* easy to address: Currently, the bean factory just = processes the FactoryBean itself, in terms of bean properties, lifecycle = methods, and bean post processors. The created object is completely the = responsibility of the FactoryBean. Of course, a defined ProxyFactoryBean with a custom FactoryBean as = target would proxy the created object, as expected. But as Daniel noted, = an auto proxy creator would currently get applied to the FactoryBean = instead of the created object. Should we leave it that way? Bean properties, lifecycle methods, and = also bean post processors like ApplicationContextAwareProcessor are in = fact meant to be applied on the FactoryBean itself. Could we add a clean = option to apply bean post processors to the created objects, if = demanded? BTW, I think that our current PropertyValuesProviderFactoryBean = sub-interface is useless. All the bean factory does with the = PropertyValues from there is to apply them to the created object via a = newly instantiated BeanWrapper: A FactoryBean implementation could = easily do that itself with a one-liner, if actually required. And currently, the bean factory applies such property values on every = FactoryBean.getObject call, be it for a singleton object or not. It = would need to apply them once to a singleton object, via storing where = already applied - but I prefer getting rid of = PropertyValuesProviderFactoryBean in the first place. Juergen -----Original Message----- From: SourceForge.net [mailto:no...@so...] Sent: Tuesday, December 02, 2003 11:08 PM To: no...@so... Subject: [springframework - Help] AOP interception of FactoryBean components? Read and respond to this message at:=20 https://sourceforge.net/forum/message.php?msg_id=3D2314648 By: djpotter77 How might one go about defining an interceptor for a component created = by a FactoryBean (not the FactoryBean itself)? Providing the bean id of the = component to an auto proxy creator simply causes the getObject() and isSingleton() = methods of the underlying FactoryBean to be intercepted, not the component = you're really interested in intercepting. Regards, Daniel ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit:=20 https://sourceforge.net/forum/unmonitor.php?forum_id=3D250340 |