|
From: Colin S. <col...@ex...> - 2003-10-14 22:08:34
|
I suppose, although to tell you the truth I prefer to declare my trnasactions separately from the source. Putting them in the source couples things too closely for my taste, and makes management harder, given that I want to change things around for unit tests and the like. Kopylenko, Dmitry wrote: >Colin, > >that will be possible when the metadata support and "magic" >TransactionAutoProxy creator will be in place ;-) > >Regards, >Dmitriy. > >-----Original Message----- >From: Colin Sampaleanu >To: "jürgen höller [werk3AT]" >Cc: spr...@li... >Sent: 10/14/2003 5:49 PM >Subject: Re: [Springframework-developer] new bean factory and application >context features > >jürgen höller [werk3AT] wrote: > > > >>... >> >>This is a BeanPostProcessor bean that can be set up as follows to proxy >> >> >the beans with the given names with the given interceptors. Note that >this is only one bean with proxy settings to define, although there >might be dozens of target beans with the same proxy behavior. > > >><bean id="autoProxyCreator" >> >> >class="org.springframework.aop.framework.support.AutoProxyCreator"> > > >> <property >> >> >name="beanNames"><value>myBean1,myBean2,myBean3</value></property> > > >> <property name="interceptors> >> <list> >> <ref bean="myInterceptor1"/> >> <ref bean="myInterceptor2"/> >> </list> >> </property> >></bean> >> >>So setting up 10 transactional beans would just involve 1 >> >> >AutoProxyCreator and 1 transaction interceptor plus the 10 target beans >(12 beans in total), instead of 10 TransactionProxyFactoryBeans plus the >10 target beans (20 beans in total). The transaction attributes would be >centralized though, in contrast to TransactionProxyFactoryBean that >keeps them local per individual proxy definition. > > >> >> >> >> >Hi Juergen, > >How do you see this being used (if at all) with the current >TransactionInterceptor, since its TransactionAttributeSource property >gets satisfied via a MethodMapTransactionAttributeSource instance (which > >needs definitions in the format 'FQN.methodName'). While this works fine > >when doing individual interceptors for use with ProxyFactoryBean, short >of adding new code I'm at a loss as to how I could use >TransactionInterceptor with BeanNameAutoProxy to do transactions on all >methods in all the beans I feed to the auto proxy. > >Just wondering if I missed something? > >Regards, >Colin > > > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |