You should not use database connection pools to connect directly to the database of an application. To interact with an application database you should only use an adapter. Database connections should only be made to databases that do not support an application because adapters use the business logic provided by programming interfaces of the application. If you connect directly to an application database to perform a SQL update statement, for example, then you circumvent any related logic that the API would have performed in response to an update operation. This violates the integrity of the application and the business process.
If you have a need to retrieve information from an application, but do not want to use an adapter because of the impact on performance of sending a business object request to the application and receiving the response, you have several alternatives:
This approach is best for retrieving information in the application database that changes frequently, because each request will retrieve information that is current at the time of the request.
This approach is most useful for small amounts of information that is flat and static, such as a lookup table. You should not, however, use this approach for large entities that span multiple tables because the queries involved would be difficult to create and maintain, whereas using business objects to represent the entity would be easy for you to develop and for others to maintain. It is also not very good for tables that are very dynamic and have new records added frequently, because you either must manually update the replicated table frequently, or risk the interface having outdated information.