public String getURL() { try { return dataSource.getURL(); } catch (SQLException e) { return "<unknown location>"; } }
public void setMaxStatements(Integer ms) throws SQLException { int i = ms == null ? 0 : ms; dataSource.setMaxStatements(i); dataSource.setImplicitCachingEnabled(i != 0); }
public void setConnectionCacheName(String s) throws SQLException { // the following have to be set together in this exact order dataSource.setConnectionCachingEnabled(true); dataSource.setFastConnectionFailoverEnabled(true); dataSource.setConnectionCacheName(s); }
public ScriptRunner(final String jdbcUrl, final String username, final String password) throws SQLException { OracleDataSource ds = new OracleDataSource(); ds.setURL(jdbcUrl); ds.setUser(username); ds.setPassword(password); this.dataSource = ds; }
public void setPassword(String pwd) { this.password = pwd; dataSource.setPassword(pwd); }
public void setUserName(String user) { dataSource.setUser(user); }
oracle.jdbc.pool.OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource(); ds.setDriverType("thin"); ds.setServerName("localhost"); ds.setPortNumber(1521); ds.setDatabaseName("XE"); // Oracle SID Connection con = ds.getConnection(user, password);
public String getUserName() { return dataSource.getUser(); }
public String getConnectionCacheName() throws SQLException { return dataSource.getConnectionCacheName(); }
public void setServiceName(String serviceName) { dataSource.setServiceName(serviceName); }
public void setDescription(String desc) { dataSource.setDescription(desc); }
public String getDriverType() { return dataSource.getDriverType(); }
public String getTNSEntryName() { return dataSource.getTNSEntryName(); }
public Integer getMaxStatements() throws SQLException { return dataSource.getMaxStatements(); }
public String getNetworkProtocol() { return dataSource.getNetworkProtocol(); }
public String getServerName() { return dataSource.getServerName(); }
public void setPassword(String pwd) { this.password = pwd; dataSource.setPassword(pwd); }
oracle.jdbc.pool.OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource(); ds.setDriverType("thin"); ds.setServerName("localhost"); ds.setPortNumber(1521); ds.setDatabaseName("XE"); // Oracle SID ds.setUser("Herong"); ds.setPassword("TopSecret");
public String getURL() { try { return dataSource.getURL(); } catch (SQLException e) { return "<unknown location>"; } }
public void setMaxStatements(Integer ms) throws SQLException { int i = ms == null ? 0 : ms; dataSource.setMaxStatements(i); dataSource.setImplicitCachingEnabled(i != 0); }