@Alternative @Priority(value=2010) public class CDITransactionProducers extends Object
This bean produces the TransactionSynchronizationRegistry.
If there is not defined the JNDI binding (the InitialContext lookup
has precedence over the CDI) then the CDI bean is taken for the source
for the instance of the txn synchronization registry.
This producer defines a way how the TransactionSynchronizationRegistry
is obtained by the application. The Alternative is used for enabling
the bean only in case when CDI binding test case is run.
See CDIBindingTestCase#before()
If this producer is not activated then default Narayana implementation
of TransactionSynchronizationRegistry is used.
| Constructor and Description |
|---|
CDITransactionProducers() |
| Modifier and Type | Method and Description |
|---|---|
TransactionSynchronizationRegistry |
produceTransactionSynchronizationRegistry() |
@Produces @ApplicationScoped public TransactionSynchronizationRegistry produceTransactionSynchronizationRegistry()
Copyright © 2017–2020. All rights reserved.