i'm implementing the CachedRowset class (in the sun.jdbc.rowset.* extended
and unsupported class api) in a Java Server page template and want to know
if there is a down side to doing this. my schedule doesn't permit me to
integrate this w/ the 3rd party (bea ) Connection Pool management bean that
i would rather do or write my own Connection Pool app.
i'm using this CachedRowset on a page that allows for "paging N number of
records back and forth" and each time i check to see if it's null which
means, i believe, if it's still resident in memory, and if it is i don't
call it again. (i'm new to this so bare w/ me on the technical explanation).
please give me any and all advice if you have used this object before.
anything such as coding techniques of scrolling or any load statistics that
sheds light on the actual performance of this object. my requirement is to
be "scalable", so what happens to the, i'm assuming, web server's memory
cache when you have >100,000 people hitting this page.....(we'll be load
testing this this week but i thought i'd go ahead and ask you guys, the
professionals and afficianados.....)
much appreciated for your response.
code sample below
<%!
//declarations
public CachedRowSet cachedResultSet = null;
static public int PAGE_MAX_ROWS = 10;
static public boolean debug = true;
static public int page_num = 1;
static public int page_count = 0;
%>
//if: we have a cached resultset don't process, (also check for change of
category)
if ( cachedResultSet == null )
{
//debug: shouldn't come here if we're already initialized
System.out.println("************************************");
System.out.println("Loading cached resultset....");
%>
<es:preparedstatement id="ps" sql="<%=SQL%>" pool="portal">
<%
//execute: query
java.sql.ResultSet rs = ps.executeQuery();
//create and populate cached rowset
cachedResultSet = new CachedRowSet();
cachedResultSet.populate(rs);
//close resultset
rs.close();
System.out.println("Loaded:" +
cachedResultSet.size() );
System.out.println(" " );
%>
</es:preparedstatement>
<% } %>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets