Java Code Examples for bitronix.tm.TransactionManagerServices#isTransactionManagerRunning()
The following examples show how to use
bitronix.tm.TransactionManagerServices#isTransactionManagerRunning() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JTATransactionManagerConfiguration.java From high-performance-java-persistence with Apache License 2.0 | 5 votes |
@Bean public bitronix.tm.Configuration btmConfig() { bitronix.tm.Configuration configuration = TransactionManagerServices.getConfiguration(); if (!TransactionManagerServices.isTransactionManagerRunning()) { configuration.setServerId("spring-btm"); configuration.setWarnAboutZeroResourceTransaction(true); configuration.setJournal(btmJournal); } return configuration; }
Example 2
Source File: AbstractJTATransactionManagerConfiguration.java From high-performance-java-persistence with Apache License 2.0 | 5 votes |
@Bean public bitronix.tm.Configuration btmConfig() { bitronix.tm.Configuration configuration = TransactionManagerServices.getConfiguration(); if (!TransactionManagerServices.isTransactionManagerRunning()) { configuration.setServerId("spring-btm"); configuration.setWarnAboutZeroResourceTransaction(true); configuration.setJournal(btmJournal); } return configuration; }
Example 3
Source File: XACacheTest.java From ehcache3 with Apache License 2.0 | 5 votes |
@After public void tearDownBtm() throws Exception { if(cacheManager != null) { cacheManager.close(); } if (TransactionManagerServices.isTransactionManagerRunning()) { TransactionManagerServices.getTransactionManager().shutdown(); } }
Example 4
Source File: BitronixTransactionManagerLookup.java From ehcache3 with Apache License 2.0 | 5 votes |
@Override public TransactionManagerWrapper lookupTransactionManagerWrapper() { // <2> if (!TransactionManagerServices.isTransactionManagerRunning()) { // <3> throw new IllegalStateException("BTM must be started beforehand"); } TransactionManagerWrapper tmWrapper = new TransactionManagerWrapper(TransactionManagerServices.getTransactionManager(), new BitronixXAResourceRegistry()); // <4> LOGGER.info("Using looked up transaction manager : {}", tmWrapper); return tmWrapper; }
Example 5
Source File: TransactionalOsgiTest.java From ehcache3 with Apache License 2.0 | 4 votes |
@After public void tearDown() throws Exception { if (TransactionManagerServices.isTransactionManagerRunning()) { TransactionManagerServices.getTransactionManager().shutdown(); } }
Example 6
Source File: XA107Test.java From ehcache3 with Apache License 2.0 | 4 votes |
@After public void tearDown() throws Exception { if (TransactionManagerServices.isTransactionManagerRunning()) { TransactionManagerServices.getTransactionManager().shutdown(); } }
Example 7
Source File: XAGettingStarted.java From ehcache3 with Apache License 2.0 | 4 votes |
@After public void tearDown() throws Exception { if (TransactionManagerServices.isTransactionManagerRunning()) { TransactionManagerServices.getTransactionManager().shutdown(); } }
Example 8
Source File: StatefulSerializerTest.java From ehcache3 with Apache License 2.0 | 4 votes |
@After public void tearDown() throws Exception { if (TransactionManagerServices.isTransactionManagerRunning()) { TransactionManagerServices.getTransactionManager().shutdown(); } }