New Queue API
pierre opened this issue · 1 comments
pierre commented
Change PersistentBus
to get rid of Transmogrifier
:
public void postFromTransaction(BusEvent event, final Transmogrifier transmogrifier) throws EventBusException;
becomes
public void postFromTransaction(BusEvent event, final Connection connection) throws EventBusException;
where connection
is a generic java.sql.Connection
(autoCommit
is false).
Changes in killbill-commons:
- Fix implementation in
DefaultPersistentBus
- Create a
DataSource
to return thatConnection
- Create a
DBI
from thisDataSource
- Call
onDemand
Changes in killbill:
- Implement new
TransactionHandler
(KillBillTransactionHandler
) - Have
KillBillTransactionHandler
delegate toRestartTransactionRunner
(configurable) - Intercept the transaction and cache the
Handle
in a thread local EntitySqlDaoTransactionalJdbiWrapper
can now get theTransactionHandler
from theDBI
and pass theConnection
inEntitySqlDaoTransactionWrapper#inTransaction
(signature change)
As part of this work, we should
- check with upstream if they can expose the
Handle
/Connection
in the transaction directly - upgrade
JDBI
to the latest version
pierre commented
The changes in Kill Bill were actually simpler. See killbill/killbill@66576bf and killbill/killbill@0796d02.