Advertisement
Adeptius

Untitled

Nov 18th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. import org.postgresql.jdbc2.optional.ConnectionPool;
  2. import com.mchange.v2.c3p0.ComboPooledDataSource;
  3.  
  4. private ComboPooledDataSource cpds;
  5. cpds = new ComboPooledDataSource();
  6. cpds.setDriverClass("com.mysql.jdbc.Driver");
  7. cpds.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/company");
  8.         cpds.setUser("user");
  9.         cpds.setPassword("1234");
  10.         cpds.setMinPoolSize(5);
  11.         cpds.setMaxPoolSize(5);
  12.         cpds.setAcquireIncrement(0);
  13.  
  14.  
  15. Connection connection = getConnection();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement