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].

Upcoming Training Events

0 AM
Visual Studio Live! San Diego
September 8-12, 2025
Live! 360 Orlando
November 16-21, 2025
Cloud & Containers Live! Orlando
November 16-21, 2025
Data Platform Live! Orlando
November 16-21, 2025
Visual Studio Live! Orlando
November 16-21, 2025