Package org.springframework.transaction

Examples of org.springframework.transaction.InvalidIsolationLevelException


        return ((JcrTransactionObject) transaction).hasTransaction();
    }

    protected void doBegin(Object transaction, TransactionDefinition transactionDefinition) throws TransactionException {
        if (transactionDefinition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
            throw new InvalidIsolationLevelException("JCR does not support an isolation level concept");
        }

        XASession session = null;

        try {
View Full Code Here


  protected void applyIsolationLevel(JiniTransactionObject txObject,
      int isolationLevel) throws InvalidIsolationLevelException,
      SystemException {

    if (isolationLevel != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException(
          "JiniTransactionManager does not support custom isolation levels");
    }
  }
View Full Code Here

  }

  protected void doBegin(Object transaction, TransactionDefinition transactionDefinition)
      throws TransactionException {
    if (transactionDefinition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
      throw new InvalidIsolationLevelException("Db4o does not support an isolation level concept");
    }

    ObjectContainer container = 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

    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

      }
      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).");
        }
        if (logger.isDebugEnabled()) {
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

      }
      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

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.