import java.sql.*;
import java.util.HashSet;
class jdbcConnectionOverflow {
 public static void main (String args [])
 throws SQLException {
 DriverManager.registerDriver(new
         oracle.jdbc.driver.OracleDriver());
 String url = "jdbc:oracle:thin:/*hier korrekt fortsetzen              *///@oracle11.informatik.uni-goettingen.de:1521/dbis";
 Connection conn;
 Statement stmt;
 ResultSet rset;
 int i = 0;
 HashSet<Connection> s = new HashSet<Connection>();
 while (true) {
  try { Thread.sleep(200);  i++;  System.out.println(i);
    conn = DriverManager.getConnection(url,"scott","tiger");
    s.add(conn);
    stmt = conn.createStatement();
    rset = stmt.executeQuery("select * from qwertz");
  } catch (SQLException e) { e.printStackTrace(); }
    catch (InterruptedException ex) {
             Thread.currentThread().interrupt(); }
}}}
/* ADMIN only:
select username, count(*) from V$SESSION group by username; */
