On Mon, Nov 22, 2010 at 3:51 PM, Olivier.Roger <[email protected]> wrote:
>
> That would be great. In fact I already asked my employer for approval. I
> should have an answer in the coming days.
>
> I had another question about the transactional aspect.
> At the moment I added annotation in the JdbcAggregationRepository class
> which implements RecoverableAggregationRepository.
>
> I am quite new to Spring Transaction and I think I used an old way to enable
> Spring to create a proxy with transactional behavior. Here is the code I add
> in the application Context:
>
>    <!-- Transaction AOP with Annotation -->
>    <bean
> class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
>
>    <bean
> class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
>      <property name="transactionInterceptor" ref="txInterceptor"/>
>    </bean>
>
>    <bean id="txInterceptor"
> class="org.springframework.transaction.interceptor.TransactionInterceptor">
>      <property name="transactionManager" ref="PlatformTransactionManager"/>
>      <property name="transactionAttributeSource">
>        <bean
> class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"/>
>      </property>
>    </bean>
>
> This means, that the aggregator repository will only be transactional this
> boilerplate code is added.
>
> In our uses case, the aggregator should always be transactional. Therefore,
> I would like to be able to load that code in a spring context defined in the
> project, like META-INF/camel/contex.xml. The user would then only have to
> provide the transactionManager.
>
> Is that possible ? If not is there a way to archive the same result in
> another way ?
>

Yeah we ought to be able to leverage the .transacted stuff already in Camel.

In fact you should be able to add .transacted as first step in the aggregator.

aggregate(xxxxx)
   .transacted()
   .to("yyyy")
   .to("zzzz")
.end()





> Thanks for your help on this
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3275451.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to