Package org.springframework.transaction

Examples of org.springframework.transaction.InvalidIsolationLevelException


   */
  protected void applyIsolationLevel(JtaTransactionObject txObject, int isolationLevel)
      throws InvalidIsolationLevelException, SystemException {

    if (!this.allowCustomIsolationLevels && isolationLevel != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "JtaTransactionManager does not support custom isolation levels by default - " +
          "switch 'allowCustomIsolationLevels' to 'true'");
    }
  }
View Full Code Here


      }
      else {
        // Not allowed to change the transaction settings of the JDBC Connection.
        if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
          // We should set a specific isolation level but are not allowed to...
          throw new InvalidIsolationLevelException(
              "HibernateTransactionManager is not allowed to support custom isolation levels: " +
              "make sure that its 'prepareConnection' flag is on (the default) and that the " +
              "Hibernate connection release mode is set to 'on_close' (SpringTransactionFactory's default). " +
              "Make sure that your LocalSessionFactoryBean actually uses SpringTransactionFactory: Your " +
              "Hibernate properties should *not* include a 'hibernate.transaction.factory_class' property!");
View Full Code Here

   */
  public Object beginTransaction(Transaction transaction, TransactionDefinition definition)
      throws JDOException, SQLException, TransactionException {

    if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "Standard JDO does not support custom isolation levels: " +
          "use a special JdoDialect implementation for your JDO provider");
    }
    transaction.begin();
    return null;
View Full Code Here

   */
  public Object beginTransaction(EntityManager entityManager, TransactionDefinition definition)
      throws PersistenceException, SQLException, TransactionException {

    if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "Standard JPA does not support custom isolation levels - " +
          "use a special JpaDialect for your JPA implementation");
    }
    entityManager.getTransaction().begin();
    return null;
View Full Code Here

      }
      else {
        // Not allowed to change the transaction settings of the JDBC Connection.
        if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
          // We should set a specific isolation level but are not allowed to...
          throw new InvalidIsolationLevelException(
              "HibernateTransactionManager is not allowed to support custom isolation levels: " +
              "make sure that its 'prepareConnection' flag is on (the default) and that the " +
              "Hibernate connection release mode is set to 'on_close' (LocalSessionFactoryBean's default)");
        }
        if (logger.isDebugEnabled()) {
View Full Code Here

    return (txObject.getResourceHolder() != null);
  }

  protected void doBegin(Object transaction, TransactionDefinition definition) {
    if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException("JMS does not support an isolation level concept");
    }
    JmsTransactionObject txObject = (JmsTransactionObject) transaction;
    Connection con = null;
    Session session = null;
    try {
View Full Code Here

   */
  protected void applyIsolationLevel(JtaTransactionObject txObject, int isolationLevel)
      throws InvalidIsolationLevelException, SystemException {

    if (!this.allowCustomIsolationLevels && isolationLevel != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "JtaTransactionManager does not support custom isolation levels by default - " +
          "switch 'allowCustomIsolationLevels' to 'true'");
    }
  }
View Full Code Here

   */
  public Object beginTransaction(Transaction transaction, TransactionDefinition definition)
      throws JDOException, SQLException, TransactionException {

    if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "Standard JDO does not support custom isolation levels: " +
          "use a special JdoDialect implementation for your JDO provider");
    }
    transaction.begin();
    return null;
View Full Code Here

   */
  public Object beginTransaction(EntityManager entityManager, TransactionDefinition definition)
      throws PersistenceException, SQLException, TransactionException {

    if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "Standard JPA does not support custom isolation levels - " +
          "use a special JpaDialect for your JPA implementation");
    }
    entityManager.getTransaction().begin();
    return null;
View Full Code Here

      }
      else {
        // Not allowed to change the transaction settings of the JDBC Connection.
        if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
          // We should set a specific isolation level but are not allowed to...
          throw new InvalidIsolationLevelException(
              "HibernateTransactionManager is not allowed to support custom isolation levels: " +
              "make sure that its 'prepareConnection' flag is on (the default) and that the " +
              "Hibernate connection release mode is set to 'on_close' (SpringTransactionFactory's default). " +
              "Make sure that your LocalSessionFactoryBean actually uses SpringTransactionFactory: Your " +
              "Hibernate properties should *not* include a 'hibernate.transaction.factory_class' property!");
View Full Code Here

TOP

Related Classes of org.springframework.transaction.InvalidIsolationLevelException

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.