DB data caching in java

I have listing screens in my web application that pull quite a lot of data from an oracle database. Each time the list screen is loaded, it goes to the database and retrieves the data. I want to have some kind of caching technique that can retrieve data from the database and store it in memory, and when I get data with every next request. And just like a DB, I can filter the data from the fact that with any sql, jst query, that it will not go to the DB, I would rather get the data out of memory. So the set of extracted data will be the same as the presentation of the table, and it must sequentially monitor the corresponding tables so that if any update operation is performed on the d-table, it must again retrieve the new data set from the database and serve it.

Is there any API in java to achieve the same? at ADO.net they got something like a recordset ... I don't know about that. so is there a way out.my application is based on J2EE and oracle since DB.we hv got jboss as server d. Any suggestion is welcome. Thanks.

+4
source share
4 answers

Try using Ehcache, it supports JDBC caching. And avoid creating custom solutions unless you are a JDBC guru.

+3
source

You can cache the results of your query in memcached .

When your application modifies the cached table, remove the cached item from memcached instances.

I found this short guide useful: http://pragprog.com/titles/memcd/using-memcached

+2
source

You can save this data into a data set in memory.

try this library:
http://casperdatasets.googlecode.com

you can iterate and scroll through the results in the same way as a set of results, issue queries on it, sort data and create indexes to optimize search queries - all based on memory.

+2
source

I have 2 options for this 1) Jboss cache, and you check all the details at the following JBOSS Cache link

0
source

All Articles