當前位置: 首頁>>代碼示例>>Java>>正文


Java TransactionMode類代碼示例

本文整理匯總了Java中org.unitils.database.util.TransactionMode的典型用法代碼示例。如果您正苦於以下問題:Java TransactionMode類的具體用法?Java TransactionMode怎麽用?Java TransactionMode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TransactionMode類屬於org.unitils.database.util包,在下文中一共展示了TransactionMode類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testJdbc_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testJdbc_Commit() throws Exception {
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(JdbcTest.class);
    assertPersonRecordAvailable();
    runTestPersist(JdbcTest.class);
    assertPersonRecordAvailable();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例2: testJdbc_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testJdbc_Rollback() throws Exception {
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(JdbcTest.class);
    assertPersonTableEmpty();
    runTestPersist(JdbcTest.class);
    assertPersonTableEmpty();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例3: testHibernateJpa_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernateJpa_Commit() throws Exception {
    setPersistenceProvider("hibernate");
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateJpaTest.class);
    assertPersonRecordAvailable();
    runTestPersist(HibernateJpaTest.class);
    assertPersonRecordAvailable();
    runMappingTest(HibernateJpaTest.class);
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:12,代碼來源:UnitilsIntegrationTest.java

示例4: testHibernateJpa_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernateJpa_Rollback() throws Exception {
    setPersistenceProvider("hibernate");
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateJpaTest.class);
    assertPersonTableEmpty();
    runTest(HibernateJpaTest.class, "testPersist");
    assertPersonTableEmpty();
    runMappingTest(HibernateJpaTest.class);
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:12,代碼來源:UnitilsIntegrationTest.java

示例5: testToplinkJpa_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testToplinkJpa_Commit() throws Exception {
    setPersistenceProvider("toplink");
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(ToplinkJpaTest.class);
    assertPersonRecordAvailable();
    runTestPersist(ToplinkJpaTest.class);
    assertPersonRecordAvailable();
    // TODO is this needed?
    JpaUnitils.getEntityManagerFactory().close();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:13,代碼來源:UnitilsIntegrationTest.java

示例6: testToplinkJpa_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testToplinkJpa_Rollback() throws Exception {
    setPersistenceProvider("toplink");
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(ToplinkJpaTest.class);
    assertPersonTableEmpty();
    runTestPersist(ToplinkJpaTest.class);
    assertPersonTableEmpty();
    JpaUnitils.getEntityManagerFactory().close();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:12,代碼來源:UnitilsIntegrationTest.java

示例7: testOpenJpa_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testOpenJpa_Commit() throws Exception {
    setPersistenceProvider("openjpa");
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(OpenJpaTest.class);
    assertPersonRecordAvailable();
    runTestPersist(OpenJpaTest.class);
    assertPersonRecordAvailable();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:11,代碼來源:UnitilsIntegrationTest.java

示例8: testOpenJpa_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testOpenJpa_Rollback() throws Exception {
    setPersistenceProvider("openjpa");
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(OpenJpaTest.class);
    assertPersonTableEmpty();
    runTestPersist(OpenJpaTest.class);
    assertPersonTableEmpty();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:11,代碼來源:UnitilsIntegrationTest.java

示例9: testHibernateJpaSpring_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernateJpaSpring_Commit() throws Exception {
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateJpaSpringTest.class);
    assertPersonRecordAvailable();
    runTestPersist(HibernateJpaSpringTest.class);
    assertPersonRecordAvailable();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例10: testHibernateJpaSpring_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernateJpaSpring_Rollback() throws Exception {
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateJpaSpringTest.class);
    assertPersonTableEmpty();
    runTestPersist(HibernateJpaSpringTest.class);
    assertPersonTableEmpty();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例11: testHibernate_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernate_Commit() throws Exception {
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateJpaSpringTest.class);
    assertPersonRecordAvailable();
    runTestPersist(HibernateTest.class);
    assertPersonRecordAvailable();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例12: testHibernate_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernate_Rollback() throws Exception {
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateJpaSpringTest.class);
    assertPersonTableEmpty();
    runTestPersist(HibernateTest.class);
    assertPersonTableEmpty();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例13: testHibernateSpring_Commit

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernateSpring_Commit() throws Exception {
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateSpringTest.class);
    assertPersonRecordAvailable();
    runTestPersist(HibernateSpringTest.class);
    assertPersonRecordAvailable();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例14: testHibernateSpring_Rollback

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void testHibernateSpring_Rollback() throws Exception {
    setTransactionMode(TransactionMode.ROLLBACK);
    Unitils.initSingletonInstance();
    runTestFindById(HibernateSpringTest.class);
    assertPersonTableEmpty();
    runTestPersist(HibernateSpringTest.class);
    assertPersonTableEmpty();
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:10,代碼來源:UnitilsIntegrationTest.java

示例15: noDataSourceCreatedWhenNotUsedWithTransactionsEnabled

import org.unitils.database.util.TransactionMode; //導入依賴的package包/類
@Test
public void noDataSourceCreatedWhenNotUsedWithTransactionsEnabled() throws Exception {
    setWrongDatabasePassword();
    setTransactionMode(TransactionMode.COMMIT);
    Unitils.initSingletonInstance();
    runTest(NoDatabaseTest.class, "testWhichDoesntNeedDatabase");
}
 
開發者ID:linux-china,項目名稱:unitils,代碼行數:8,代碼來源:UnitilsIntegrationTest.java


注:本文中的org.unitils.database.util.TransactionMode類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。