Hmm.. sounds like you need to look at your pagination logic.
I work with WebSphere. When you close a jdbc connection, WebSphere's connection pool logic is to "commit" any outstanding transactions and put the connection back into the pool.
If you are hanging on to the "result set" between invocations for doing your "paging", you need to do something different.
Examples:
1) Save first and last primary keys from the currently displayed "page" and use them to refine the query for the next "page".
(this implies that you get a connection from the pool, do the query, close resultset, statement, and connection each time)
2) Save off all the data from the result set in a session object and do paging from that. I don't really recommend this.
I am sure others will chime in with additional options.
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:SERVLET-INTEREST@(protected)
Sent: Wednesday, May 05, 2004 10:50 AM
To: SERVLET-INTEREST@(protected)
Subject: Re: How should a connection pool act?
OK, I'm not closing the connection but I still have the problem. When I
close the connection, pagination stops working.
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:SERVLET-INTEREST@(protected)
Qureshi, Affan
Sent: Wednesday, May 05, 2004 9:45 AM
To: SERVLET-INTEREST@(protected)
Subject: Re: How should a connection pool act?
Depends on your Connection pool implementation I believe. If you are
using dbcp, it doesn't actually "close" the connection but returns it to
the pool on conn.close().
Affan
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:SERVLET-INTEREST@(protected)
Galbreath, Mark A
Sent: Wednesday, May 05, 2004 9:39 AM
To: SERVLET-INTEREST@(protected)
Subject: Re: How should a connection pool act?
I don't think you do not want to close the connection if you are
pooling.
Mark
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API
Technology. [mailto:tkoc@(protected)]
Sent: Wednesday, May 05, 2004 10:37 AM
To: SERVLET-INTEREST@(protected)
Subject: How should a connection pool act?
After submitting a form, which queries my database the results come back
fine. If I keep resubmitting my form I get the error:
"Cannot get a connection, pool exhausted".
Should I get this error? Doesn't the submission use a single pool
resource?
Arhhhhh #$@#$%
Yea...I know, make sure your closing your connection! OOOhAhhhhh
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
________________________________________________________________________
___
To unsubscribe, send email to listserv@(protected)
body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
________________________________________________________________________
___
To unsubscribe, send email to listserv@(protected)
body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
________________________________________________________________________
___
To unsubscribe, send email to listserv@(protected)
body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
___________________________________________________________________________
To unsubscribe, send email to listserv@(protected)
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee.
Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized.
If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.(A)
___________________________________________________________________________
To unsubscribe, send email to listserv@(protected)
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html