|
From: Rod J. <ro...@in...> - 2005-04-12 21:26:11
|
Good idea! At some point dropping the "last in the list" would simplify the implementation, but of course this would break backward compatibility... Juergen Hoeller wrote: > Good idea! I've just added such an explicit "targetName" property, as > alternative to specifying the target name at the end of the > "interceptorNames" array. > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Colin Sampaleanu > Sent: Monday, April 11, 2005 11:12 PM > To: spr...@li... > Subject: [Springframework-developer] exposing targetName property on > ProxyFactoryBean > > > I think it'd be worth it to expose a targetName property (obviously the > existing targetName field and related code would have to be coordinated) > or alternate a targetBeanName property, on the proxyFactoryBean. > > Right now if you want to proxy a prototype bean, an easy way to do it is > to have it as the last bean name in the interceptorNames list. However, > this mechanism is not convenient to use when you want to have a base > abstract template (parent) proxy definition, and override it with a > small child definition for each real proxy, as you'd have to set the > interceptorNames property in each child. > > The alternative is to use a nested PrototypeTargetSource bean > definition, and set it via the targetSource property of the proxy > factory bean. This works fine, but adds 3 extra lines of config. > > Exposing a targetName or targetBeanName property which amounts to the > same thing would be quite a lot less verbose when people have many > prototype proxies... > > Colin > > -- > Colin Sampaleanu > Interface21 Principal Consultant > Spring Training, Consulting and Support - "From the Source" > http://www.springframework.com > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- Rod Johnson Interface21 - Spring Services from the Source http://www.springframework.com Founder, Spring Framework: http://www.springframework.org Author, "Expert One-on-One J2EE Development Without EJB" (May 2004, with Juergen Hoeller). http://www.amazon.com/exec/obidos/ASIN/0764558315/ Author, "Expert One-on-One J2EE Design and Development" (October 2002). http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/ ____________________________________________________ Interface21 Limited Registered Office Summit House, 2-2a Highfield Road, Dartford, Kent DA1 2JY Registered in England and Wales No. 5187766 ____________________________________________________ |