Croway opened a new pull request, #22204:
URL: https://github.com/apache/camel/pull/22204

   # Description
   
   Problem: When a Camel application receives a graceful shutdown while a 
transacted route is mid-processing (e.g., during a long-running stored 
procedure or delay that exceeds the grace period), in-flight transactions are 
committed instead of rolled back. The container destroys the connection pool 
during shutdown, but the transaction has already committed partial work.
   
   Fix: The TransactionErrorHandler (both camel-jta and camel-spring) now 
tracks in-flight transacted exchanges. When DefaultShutdownStrategy triggers a 
forced shutdown after the grace period expires, prepareShutdown(forced=true) 
marks all in-flight exchanges as rollbackOnly. Additionally, after 
processByErrorHandler() returns, a preparingShutdown check sets rollbackOnly on 
any exchange that completed processing after the shutdown flag was set. Both 
mechanisms cause the transaction policy to throw, triggering a rollback before 
the connection pool is destroyed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to