Package org.springframework.transaction

Examples of org.springframework.transaction.CannotCreateTransactionException


    catch (Exception ex) {
      if (txObject.isNewSessionHolder()) {
        SessionFactoryUtils.closeSession(session);
      }
      throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex);
    }
  }
View Full Code Here


    }
    try {
      return conHolder.createSavepoint();
    }
    catch (Throwable ex) {
      throw new CannotCreateTransactionException("Could not create JDBC savepoint", ex);
    }
  }
View Full Code Here

    catch (Exception ex) {
      if (txObject.isNewSessionHolder()) {
        SessionFactoryUtils.closeSession(session);
      }
      throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex);
    }
  }
View Full Code Here

        }
        catch (Throwable ex2) {
          // ignore
        }
      }
      throw new CannotCreateTransactionException("Could not create JMS transaction", ex);
    }
  }
View Full Code Here

      // assume nested transaction not supported
      throw new NestedTransactionNotSupportedException(
          "JTA implementation does not support nested transactions", ex);
    }
    catch (SystemException ex) {
      throw new CannotCreateTransactionException("JTA failure on begin", ex);
    }
  }
View Full Code Here

      PersistenceManagerFactoryUtils.releasePersistenceManager(pm, getPersistenceManagerFactory());
      throw ex;
    }
    catch (Exception ex) {
      PersistenceManagerFactoryUtils.releasePersistenceManager(pm, getPersistenceManagerFactory());
      throw new CannotCreateTransactionException("Could not open JDO PersistenceManager for transaction", ex);
    }
  }
View Full Code Here

    MockControl ptmControl = MockControl.createControl(PlatformTransactionManager.class);
    PlatformTransactionManager ptm = (PlatformTransactionManager) ptmControl.getMock();
    // Expect a transaction
    ptm.getTransaction(txatt);
    CannotCreateTransactionException ex = new CannotCreateTransactionException("foobar", null);
    ptmControl.setThrowable(ex);
    ptmControl.replay();

    TestBean tb = new TestBean() {
      public String getName() {
View Full Code Here

        }
        finally {
          SessionFactoryUtils.closeSession(session);
        }
      }
      throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex);
    }
  }
View Full Code Here

            return txId;
        }
        catch ( ResourceManagerSystemException e )
        {
            log.error( e );
            throw new CannotCreateTransactionException( e.getMessage(), e );
        }
    }
View Full Code Here

      if (mts.isNewSynchonization()) {
        synchronizationManager.clearSynchronization();
      }

      throw new CannotCreateTransactionException(ex.getMessage(), ex);
    }

    return mts;
  }
View Full Code Here

TOP

Related Classes of org.springframework.transaction.CannotCreateTransactionException

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.