package br.com.MDSGPP.ChamadaParlamentar.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class ConnectionFactory {

	private static Connection conexao;

	public ConnectionFactory() {

	}

	public Connection getConnection() throws ClassNotFoundException, SQLException {
		if(ConnectionFactory.conexao == null) {
			Class.forName("com.mysql.jdbc.Driver");
			ConnectionFactory.conexao = DriverManager.getConnection
					("jdbc:mysql://localhost/chamada", "root", "12345");
		}
		return ConnectionFactory.conexao;
	}

	public static Connection getConexao() {
		return conexao;
	}	
}

@@ -235,16 +235,339 @@
 () %7B%0A%0A%09%7D
+%0A%09%0A%09/**%0A%09 * Method that checks if the database connection exists, if not it creates%0A%09 * the connection and returns it.%0A%09 * %0A%09 * @returns the connection with the database.%0A%09 * @throws ClassNotFoundException%0A%09 *             if the database is off.%0A%09 * @throws SQLException%0A%09 *             if miss spelled SQL is entered.%0A%09 */
 %0A%0A%09publi
@@ -885,16 +885,101 @@
 exao;%0A%09%7D
+%0A%09%0A%09/**%0A%09 * Getter of connection, %3Cb%3Edeprecated%3C/b%3E.%0A%09 * %0A%09 * @return connection%0A%09 */
 %0A%0A%09publi

Comment the method of class ConnectionFactory