ConnectionManager
how to make connection manager?
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
CHN15M116CHN15M116 package ExamplePackage;
import java.sql.*;
import java.util.*;
public class
ConnectionManager {
static Connection con;
static String url;
public static Connection getConnection()
{
try
Advertisements
CRUD DAOCRUD 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
doubt in ejb3 - EJB [ConnectionFactoryBindingService] Bound
ConnectionManager 'jboss.jca:service=DataSourceBinding,name