此内容没有您所选择的语言版本。
20.2. Obtain the Transaction Manager From the Cache
Use the following configuration after initialization to obtain the TransactionManager from the cache:
Procedure 20.1. Obtain the Transaction Manager from the Cache
- Define a
transactionManagerLookupClassby adding the following property to yourBasicCacheContainer's configuration location properties:Configuration config = new ConfigurationBuilder() ... .transaction().transactionManagerLookup(new GenericTransactionManagerLookup()) - Call
TransactionManagerLookup.getTransactionManageras follows:TransactionManager tm = cache.getAdvancedCache().getTransactionManager();