Handling a database connection.

Enterprise Java
Connection Strategies in EntityBeans

Prakash Malani
Listing 1. Handling a database connection.


Connection  c = DriverManager.getConnection(
    "jdbc:oracle:thin:@homer:1521:maggie",
    "cherry",
    "cherry"
);
try {
    ...
} finally {
    c.close();
}

About the Author

Prakash Malani is principal engineer at eBuilt Inc., Irvine, CA. Mr. Malani can be contacted at [email protected].