You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Bill Pfeiffer <pf...@arbfile.org> on 2001/10/02 17:10:41 UTC

Re: Query Caching

Query CachingStacy,

I am using struts in combination with the dbtags lib.  Essentially struts
allows me to perform business processing and then forward to my jsp.  The
business processing is performed in an "action" class.  What I do is perform
my query using Sun's CachedRowSet.  I then put this RowSet into the request
attribute.  I could put it in the session to make it stick around but I
don't need to.  In either case, at this point, the RowSet is available to
the dbtags lib.

The actual business logic to build and get the query is in an EJB.  It just
returns an object implementing RowSet, which itself implements ResultSet,
and is therefore accessible via dbtags.  I get full mvc AND use of the
dbtags.  I don't have to code my query in my jsp.

Look at Sun's CachedRowSet implementation if you are interested:

http://developer.java.sun.com/developer/earlyAccess/crs/

Let me know if you have any questions on this.

Bill Pfeiffer



----- Original Message -----
From: Stacy Young
To: 'taglibs-user@jakarta.apache.org'
Sent: Friday, September 28, 2001 5:58 PM
Subject: Query Caching


Is there a taglib that supports query caching? Say for isntance I'm using a
SQL Taglib to execute a database query, I'd like to hold the results in
memory for X amount of time so subsequent queries of the same "id" are
pulled from memory and not another trip to the DB.
Thanks!
Stacy Young
Surefire Commerce
tel: 514-380-2700 ext 3234
http://www.surefirecommerce.com
"It all started with a Mouse." -Walt Disney