Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Connection getConnection(){
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
- String url = "jdbc:derby:<slave db location>;startSlave=true";
- System.out.println("about to fetch connection");
- Connection con= null;
- try{
- con=DriverManager.getConnection(url, "root", "root");
- }catch(Exception e){
- e.printStackTrace();
- }
- System.out.println("return con -"+con);
- return con;
- }
- public static Connection getConnection(){
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
- String url = "jdbc:derby:<slave db location>;";
- System.out.println("about to fetch connection");
- Connection con= null;
- try{
- con=DriverManager.getConnection(url, "root", "root");
- }catch(Exception e){
- e.printStackTrace();
- }
- System.out.println("return con -"+con);
- return con;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement