Package org.springframework.transaction

Examples of org.springframework.transaction.CannotCreateTransactionException


      }
    }

    catch (Exception ex) {
      DataSourceUtils.releaseConnection(con, this.dataSource);
      throw new CannotCreateTransactionException("Could not open JDBC Connection for transaction", ex);
    }
  }
View Full Code Here


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

      cache.getCacheTransactionManager().begin();
      TransactionSynchronizationManager.bindResource(cache, txObject.getHolder());
    }

    catch (IllegalStateException ex) {
      throw new CannotCreateTransactionException(
          "An ongoing transaction already is already associated with the current thread; are there multiple transaction managers ?",
          ex);
    }
  }
View Full Code Here

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

      closeEntityManagerAfterFailedBegin(txObject);
      throw ex;
    }
    catch (Exception ex) {
      closeEntityManagerAfterFailedBegin(txObject);
      throw new CannotCreateTransactionException("Could not open JPA EntityManager 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

      TransactionSynchronizationManager.bindResource(getConnectionFactory(), txObject.getResourceHolder());
    } catch (AmqpException ex) {
      if (resourceHolder != null) {
        ConnectionFactoryUtils.releaseResources(resourceHolder);
      }
      throw new CannotCreateTransactionException("Could not create AMQP transaction", ex);
    }
  }
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.