23.1. Data Source overview

Portlet applications access relational databases through the JDBC API to store, organize, and retrieve data. As an option, databases can also be accessed via DataSource objects. In this case, the connection object that the getConnection() method returns is a handle to a PooledConnection object rather than being a physical connection.

In the general sense, using a connection pooling has no impact on portlet applications except that connections should be closed. When a portlet application closes a connection that is pooled, the connection is returned to a pool of reusable connections. Using a connection pool will give you the following benefits:

  • A connection does not need to be created every time one is requested.

  • You ...

Get IBM Rational Application Developer V6 Portlet Application Development and Portal Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.