@CallerSensitive
public static Connection getConnection (String url, String user, String password) throws SQLException

Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.

Note: If the user or password property are also specified as part of the url, it is implementation-defined as to which value will take precedence. For maximum portability, an application should only specify a property once.

Parameters:
url    a database url of the form jdbc:subprotocol:subname
user    the database user on whose behalf the connection is being made
password    the user's password

Returns:  a connection to the URL

Exceptions:
SQLException    if a database access error occurs or the url is null
SQLTimeoutException    when the driver has determined that the timeout value specified by the setLoginTimeout method has been exceeded and has at least tried to cancel the current database connection attempt