10.7. Resource Pooling
BlazeDS interacts with and interfaces with message queues and topics, databases and Java enterprise infrastructure. Many of these external systems and libraries, such as messaging infrastructure, database connections and stateless business services, lend themselves to pooling. When resources are pooled, they are shared over multiple clients.
Usually the creation and initialization, as well as the cleanup and garbage collection, of a resource is expensive. If such a resource is reused often and each time it is used the interaction time is not substantially long, then it is a good candidate for pooling.
In typical enterprise-grade Flex and BlazeDS applications, interaction with a database is an important and necessary part of the application. If such applications utilize near real-time updates, then JMS and messaging infrastructure also become very relevant.
In this section, I discuss JDBC connection and JMS resource pooling to illustrate the use of resource pooling to enhance Flex and BlazeDS application performance. Much of the discussion may not even refer to BlazeDS directly. However, such is typically the case with resource pooling, where much of the activity happens quietly under the hood, without impacting the application code at all.
I start with JDBC connection pooling.
10.7.1. JDBC Connection Pooling
It is always expensive to establish database connections. The process of object creation, transfer of messages across the network for authentication ...
Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® 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.