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 pmalani@ebuilt.com.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.