Does this sound familiar? You have a domain object, perhaps for reporting
purposes, that's built from a ton of JDBC queries and it takes too long to
load. Nothing else happens until this object is built, so it's become a
bottleneck. Even worse, each of the queries is actually well tuned, so there
isn't much to gain from modifying the queries themselves - there are just too
many of them. You don't want to change (or can't change) your data model, so
what can be done to alleviate this problem short of a major redesign? There
are several options like caching, lazy loading, resource pooling. Another
worthy option would be to implement a variation of the concurrent query
pattern.
Concurrent queries are fairly simple to implement and even simpler to
describe. Rather than ser... (more)