Changeset 76


Ignore:
Timestamp:
05/06/16 09:25:03 (8 years ago)
Author:
sherbold
Message:
  • modified MySQL connection to automatically reconnect
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/MySQLResultStorage.java

    r71 r76  
    9696    { 
    9797        try { 
     98            Properties connectionProperties = new Properties(); 
     99            connectionProperties.put("user", dbUser); 
     100            connectionProperties.put("password", dbPass); 
     101            connectionProperties.put("autoReconnect", "true"); 
     102            connectionProperties.put("maxReconnects", "10000"); 
    98103            Class.forName("com.mysql.jdbc.Driver"); 
    99104            con = DriverManager.getConnection("jdbc:mysql://" + dbHost + ":" + dbPort + "/" + 
    100                 dbName + "?" + "user=" + dbUser + "&" + "password=" + dbPass); 
     105                dbName, connectionProperties); 
    101106        } 
    102107        catch (ClassNotFoundException e) { 
Note: See TracChangeset for help on using the changeset viewer.