Here you can find the source of getUserConnection()
public static Connection getUserConnection() throws SQLException
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.sql.SQLException; import java.sql.Connection; import java.sql.DriverManager; import java.util.*; import java.util.logging.*; public class Main { static String url; static String usr; static String pwd; public static Properties props; public static Connection getUserConnection() throws SQLException { Connection connection = null; checkprops();// w w w .ja v a2s . c o m Logger.global.log(Level.FINE, "DriverManager.getConnection(url, usr, pwd)"); connection = DriverManager.getConnection(url, usr, pwd); Logger.global.log(Level.INFO, "DriverManager.getConnection(url, usr, pwd) passed"); Logger.global.log(Level.FINE, "==============\n\n"); return connection; } static void checkprops() throws SQLException { if (props == null) throw new SQLException("Error: t4jdbc.properties is null. Exiting."); } }