Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection conn = DriverManager.getConnection(
- "jdbc:somejdbcvendor:other data needed by some jdbc vendor",
- "myLogin",
- "myPassword" );
- try {
- /* you use the connection here */
- } finally {
- //It's important to close the connection when you are done with it
- try { conn.close(); } catch (Throwable ignore) { /* Propagate the original exception
- instead of this one that you may want just logged */ }
- }
Advertisement
Add Comment
Please, Sign In to add comment