| Another option... We are planning some changes already to TransactionCoordinator (not the Builder). We could possibly add a method to mark for rollback-only under those same set of changes. You could use that to route to whatever logic you want. The real problem is in the impl of org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.TransactionDriverControlImpl#markRollbackOnly. Couldn't you also just supply a custom TransactionCoordinator impl and a custom org.hibernate.resource.transaction.spi.TransactionCoordinator.TransactionDriver impl? As far as I can tell that should solve your problem. |