File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes apparent caching of result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "apparent caching of result set" Watch "apparent caching of result set" New topic
Author

apparent caching of result set

Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 265
Hi. I have a controller jsp that calls a bean that performs a jdbc query against an oracle table, does some mathematical operations like caclulate averages, etc, and returns a reference to an ArrayList of results to the jsp. The results are displayed in a table. My problem is that whenever I change data in the table, whether deleting rows or adding them, I keep getting the very same result that I did the first time I ever loaded this page. Does anybody know what is happening...I have rebooted my client, deleted Temporary Internet files, etc. Even the next day, I get the same old result. Thank you.

Does this have something to do with maybe the ArrayList being held in memory by the server?..but over days?...
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 265
Any browser is receiving the same result...so something is cached on the server...any help is appreciated.

Oh, I just tried clearing the arraylist in the bean before using and it doesn't help.
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 265
Hmm, it's turning out to be a database problem. Afte rputting some print statements in the bean, the numbers were coming in the same. So I went to the SQL client and found records that I thought were deleted via the SQL client (was attempting to clean out test records) were still there. This even after it told me "n rows deleted" when I fed it the DELETE command.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Tom,
It sounds like you deleted the rows from the database command line. Did you commit your changes when done?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: apparent caching of result set