I'm learning JPAContainer, and I can't understand how to configure my SGBD connection...Using DAO mode I create an class that return my connection.
//ConnectionFactory DAO mode
public class ConnectionFactory {
public Connection getConnection() {
try {
return DriverManager.getConnection(
"jdbc:mysql://localhost/fj21", "root", "");
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
How to create connection for to use with JPAContainer ? What better way ?