Package org.springframework.transaction

Examples of org.springframework.transaction.PlatformTransactionManager


    txControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    TransactionTemplate tt = new TransactionTemplate(tm);
    assertTrue("Hasn't thread pm", !TransactionSynchronizationManager.hasResource(pmf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    try {
View Full Code Here


    txControl.setReturnValue(false, 1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    TransactionTemplate tt = new TransactionTemplate(tm);
    assertTrue("Hasn't thread pm", !TransactionSynchronizationManager.hasResource(pmf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    try {
View Full Code Here

    txControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    TransactionTemplate tt = new TransactionTemplate(tm);
    assertTrue("Hasn't thread pm", !TransactionSynchronizationManager.hasResource(pmf));

    tt.execute(new TransactionCallback() {
      public Object doInTransaction(TransactionStatus status) {
View Full Code Here

    txControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    final TransactionTemplate tt = new TransactionTemplate(tm);
    final List l = new ArrayList();
    l.add("test");

    Object result = tt.execute(new TransactionCallback() {
View Full Code Here

    txControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    final TransactionTemplate tt = new TransactionTemplate(tm);
    try {
      tt.execute(new TransactionCallback() {
        public Object doInTransaction(TransactionStatus status) {
          txControl.reset();
View Full Code Here

    txControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    final TransactionTemplate tt = new TransactionTemplate(tm);
    final List l = new ArrayList();
    l.add("test");

    try {
View Full Code Here

    pmControl.setVoidCallable(2);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    final TransactionTemplate tt = new TransactionTemplate(tm);
    tt.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
    final List l = new ArrayList();
    l.add("test");
View Full Code Here

    pmControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();
    txControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    final TransactionTemplate tt = new TransactionTemplate(tm);
    tt.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
    final List l = new ArrayList();
    l.add("test");
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());
View Full Code Here

    pm.close();
    pmControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    TransactionTemplate tt = new TransactionTemplate(tm);
    tt.setPropagationBehavior(TransactionDefinition.PROPAGATION_SUPPORTS);
    final List l = new ArrayList();
    l.add("test");
    assertTrue("Hasn't thread pm", !TransactionSynchronizationManager.hasResource(pmf));
View Full Code Here

    pm.close();
    pmControl.setVoidCallable(1);
    pmfControl.replay();
    pmControl.replay();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    TransactionTemplate tt = new TransactionTemplate(tm);
    tt.setIsolationLevel(TransactionDefinition.ISOLATION_SERIALIZABLE);
    try {
      tt.execute(new TransactionCallbackWithoutResult() {
        protected void doInTransactionWithoutResult(TransactionStatus status) {
View Full Code Here

TOP

Related Classes of org.springframework.transaction.PlatformTransactionManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.