Package org.teiid.jdbc

Examples of org.teiid.jdbc.BaseDataSource


    DataSource ds = (DataSource) Class.forName(this.driver).newInstance();

    if (ds instanceof BaseDataSource) {

      BaseDataSource dataSource = (BaseDataSource) ds;

      dataSource.setDatabaseName(this.databaseName);
      if (this.applName != null) {
        dataSource.setApplicationName(this.applName);
      }

      ((TeiidDataSource) dataSource).setServerName(this.serverName);
      ((TeiidDataSource) dataSource).setPortNumber(Integer.parseInt(this.portNumber));

      if (this.username != null) {
        dataSource.setUser(this.username);
        dataSource.setPassword(this.pwd);
      }

      return ((XADataSource) dataSource).getXAConnection(this.username,
          this.pwd);
    }
View Full Code Here

TOP

Related Classes of org.teiid.jdbc.BaseDataSource

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.