Package org.apache.ibatis.datasource

Examples of org.apache.ibatis.datasource.DataSourceException


        } else {
          driverType = Class.forName(driver);
        }
        DriverManager.registerDriver(new DriverProxy((Driver) driverType.newInstance()));
      } catch (Exception e) {
        throw new DataSourceException("Error setting driver on UnpooledDataSource. Cause: " + e, e);
      }
    }
  }
View Full Code Here


      } else if (metaDataSource.hasSetter(propertyName)) {
        String value = (String) properties.get(propertyName);
        Object convertedValue = convertValue(metaDataSource, propertyName, value);
        metaDataSource.setValue(propertyName, convertedValue);
      } else {
        throw new DataSourceException("Unkown DataSource property: " + propertyName);
      }
    }
    if (driverProperties.size() > 0) {
      metaDataSource.setValue("driverProperties", driverProperties);
    }
View Full Code Here

      } else if (properties.containsKey(DATA_SOURCE)) {
        dataSource = (DataSource) initCtx.lookup(properties.getProperty(DATA_SOURCE));
      }

    } catch (NamingException e) {
      throw new DataSourceException("There was an error configuring JndiDataSourceTransactionPool. Cause: " + e, e);
    }
  }
View Full Code Here

    }
  }

  private Connection getValidConnection() {
    if (!valid) {
      throw new DataSourceException("Error accessing PooledConnection. Connection is invalid.");
    }
    return realConnection;
  }
View Full Code Here

        } else {
          driverType = Resources.classForName(driver);
        }
        DriverManager.registerDriver(new DriverProxy((Driver) driverType.newInstance()));
      } catch (Exception e) {
        throw new DataSourceException("Error setting driver on UnpooledDataSource. Cause: " + e, e);
      }
    }
  }
View Full Code Here

    }
  }

  private Connection getValidConnection() {
    if (!valid) {
      throw new DataSourceException("Error accessing PooledConnection. Connection is invalid.");
    }
    return realConnection;
  }
View Full Code Here

        } else {
          driverType = Resources.classForName(driver);
        }
        DriverManager.registerDriver(new DriverProxy((Driver) driverType.newInstance()));
      } catch (Exception e) {
        throw new DataSourceException("Error setting driver on UnpooledDataSource. Cause: " + e, e);
      }
    }
  }
View Full Code Here

      } else if (metaDataSource.hasSetter(propertyName)) {
        String value = (String) properties.get(propertyName);
        Object convertedValue = convertValue(metaDataSource, propertyName, value);
        metaDataSource.setValue(propertyName, convertedValue);
      } else {
        throw new DataSourceException("Unknown DataSource property: " + propertyName);
      }
    }
    if (driverProperties.size() > 0) {
      metaDataSource.setValue("driverProperties", driverProperties);
    }
View Full Code Here

      ctx.bind(TEST_DATA_SOURCE, expectedDataSource);

      InitialContext initCtx = new InitialContext(env);
      initCtx.bind(TEST_INITIAL_CONTEXT, ctx);
    } catch (NamingException e) {
      throw new DataSourceException("There was an error configuring JndiDataSourceTransactionPool. Cause: " + e, e);
    }
  }
View Full Code Here

      ctx.bind(TEST_DATA_SOURCE, expectedDataSource);

      InitialContext initCtx = new InitialContext(env);
      initCtx.bind(TEST_INITIAL_CONTEXT, ctx);
    } catch (NamingException e) {
      throw new DataSourceException("There was an error configuring JndiDataSourceTransactionPool. Cause: " + e, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.ibatis.datasource.DataSourceException

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.