Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Complete
-
None
Description
The JpaOutboundGatewayFactoryBean has the code:
if (!CollectionUtils.isEmpty(this.txAdviceChain)) { ProxyFactory proxyFactory = new ProxyFactory(jpaOutboundGateway); if (!CollectionUtils.isEmpty(this.txAdviceChain)) { for (Advice advice : this.txAdviceChain) { proxyFactory.addAdvice(advice); } } return (MessageHandler) proxyFactory.getProxy(this.beanClassLoader); }
According ConsumerEndpointFactoryBean logic:
for (Advice advice : this.adviceChain) { if (!replyMessageHandler || advice instanceof HandleMessageAdvice) { NameMatchMethodPointcutAdvisor handlerAdvice = new NameMatchMethodPointcutAdvisor(advice); handlerAdvice.addMethodName("handleMessage"); ...
We can refactor that code to the expected proxying logic based on the generic solution.
But for that purpose we should consider to introduce TransactionHandleMessageAdvice, which let to wrap to the TX the entire sub-flow, not only handleRequestMessage like it is with the regular TransactionInterceptor.
When we will have that Advice aboard already, we will be able to come up with the solution for the INT-3770.
Any comments are welcome!
Attachments
Issue Links
- is related to
-
INT-3770 Transaction configuration for non-polling inbound adapters/gateways
-
- Closed
-