Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC ConnectionManager

Have Programming Question? Ask it here!
 
 
 


Mumbai
ConnectionManager
1 Answer(s)      a year and 3 months ago
Posted in : JDBC


how to make connection manager?


Advertisement
View Answers

May 22, 2013 at 9:18 AM


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tcs.ignite.app.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author 495944
 */
public class ConnectionManager {
    public Connection createConnection() throws ClassNotFoundException, SQLException{
        Connection con = null;
        Class.forName("com.mysql.jdbc.Driver");
        con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
        return con;
    }
}


Related Tutorials/Questions & Answers:
ConnectionManager
class ConnectionManager { public Connection createConnection() throws
CHN15M116
CHN15M116  package ExamplePackage; import java.sql.*; import java.util.*; public class ConnectionManager { static Connection con; static String url; public static Connection getConnection() { try
Advertisements
CRUD DAO
CRUD DAO  how to create dao for create,read,update and delete?   /* *ConnectionManager * * *Version:1.0 * *Date:25-Nov-2011...; import org.apache.log4j.PropertyConfigurator; public class ConnectionManager
loginDAO and Loginservlet
con = new ConnectionManager().createConnection(); String queryString... = new ConnectionManager().createConnection(); String queryString
Hibernate 3.1.2 Released
when obtaining a connection from ConnectionManager * [HHH-1367] - warn level
doubt in ejb3 - EJB
[ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name
How does this example work even if no oracle to be used and only access is available?
How does this example work even if no oracle to be used and only access is available?  CONNECTION CLASS package ExamplePackage; import java.sql.*; import java.util.*; public class ConnectionManager { static Connection
registrationDAO& registrationservlet
= null; Connection con=new ConnectionManager().createConnection
Java runtime example - JSP-Servlet
java.util.*; public class ConnectionManager { static Connection
student registration example
ConnectionManager { static Connection con; static String url
Advertisements
 

 

 

DMCA.com