All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.snowflake.client.pooling.SnowflakeConnectionPoolDataSource Maven / Gradle / Ivy

/*
 * Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
 */
package net.snowflake.client.pooling;

import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.ConnectionPoolDataSource;
import javax.sql.PooledConnection;
import net.snowflake.client.jdbc.SnowflakeBasicDataSource;

public class SnowflakeConnectionPoolDataSource extends SnowflakeBasicDataSource
    implements ConnectionPoolDataSource {
  @Override
  public PooledConnection getPooledConnection() throws SQLException {
    Connection connection = super.getConnection();
    return new SnowflakePooledConnection(connection);
  }

  @Override
  public PooledConnection getPooledConnection(String user, String password) throws SQLException {
    Connection connection = super.getConnection(user, password);
    return new SnowflakePooledConnection(connection);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy