Example #1
0
    public Connection getCon(String url, String userName, String password) {

      int size = this.cons.size();
      ConItem con = new ConItem(null, url, userName, password);
      for (int i = 0; i < size; i++) {
        if (con.equals(this.cons.get(i))) return this.cons.get(i).con;
      }
      Connection c = OracleConnection.getConnection(url, userName, password);
      con.con = c;
      this.cons.add(con);
      return con.con;
    }
Example #2
0
 public SynServerHandler(
     ConcurrentLinkedQueue<String> jsonStrings,
     TableMapManager tableMaps,
     String url,
     String userName,
     String password) {
   this.jsonStrings = jsonStrings;
   this.tableMaps = tableMaps;
   this.url = url;
   this.userName = userName;
   this.password = password;
   this.con = OracleConnection.getConnection(this.url, this.userName, this.password);
 }