Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.forge;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- public class ConnectionManager {
- private static Connection connection = null;
- private static String url = "jdbc:sqlserver://sonar.netbyteoss.com:1433;databaseName=master; user=sa; password=myPassw0rd";
- public static Connection obtenerConexion() throws SQLException {
- if(connection==null)
- connection = DriverManager.getConnection(url);
- return connection;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement