Most Oracle ATG Web Commerce applications must be able to handle large numbers of simultaneous requests. In these applications, one of the keys to improving throughput is to share and reuse expensive resources.

For example, a single JDBC database connection might require several seconds to establish a connection to a database and verify the password. After it is connected, however, a JDBC connection can be used repeatedly to execute database operations quickly. So one of the tricks to achieving high throughput is to create a pool of JDBC connections ahead of time. When requests come in, they grab connections from the pool and use them, then return them to the pool when they are done. This approach is far more efficient than requiring each request to create its own connection.

This pooling approach is applicable for any resource that is expensive to create, but cheap to share and reuse. Oracle ATG Web Commerce includes a class called atg.service.resourcepool.ResourcePool that encapsulates the notion of pooling shared resources. Subclasses can be defined which create their own types of resources. For example, the atg.service.jdbc.MonitoredDataSource class is a subclass of ResourcePool that pools JDBC Connection objects.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices