Skip to content

Transaction Adapter

Jan Wiemer edited this page Dec 30, 2020 · 3 revisions

Transaction Adapter

The transaction adapter (interface: JacisTransactionAdapter) is passed to the constructor of the JACIS container. The default implementation expects to manage the transactions directly at the JACIS container. For this purpose the container provides a beginLocalTransaction method returning an object representing the transaction (class: JacisLocalTransaction). This object provides the methods to prepare / commit / rollback the transaction.

It is possible to pass another implementation of the transaction adapter interface to connect the JACIS container to a system managing global transactions. There is a abstract class prepared for Java Transaction API (JTA): AbstractJacisTransactionAdapterJTA. Implementations deviating from this class only have to overwrite the getTransactionManager method to provide access to the javax.transaction.TransactionManager.

Transaction Adapter

JACIS Transaction Adapter

Next Chapter: Persistence Adapter