views:

43

answers:

3

i have got listing screens in my web app that pull quite a heavy of data from oracle database. Each time the listing screen loads it goes to DB and pull data. What i want is ,i want to have some caching teching technique that can extract data from DB and keep that in memory and that when any next request is made i sud be getting data.and just like DB i sud be able to filter out data from that with any sql query,jst that it wont go to DB rather pull data from memory.so that set of extracted data will be just like a view of the table and it sud consistently moniter the corresponding tables so that if any update operation is made on d table it sud again fetch new set of data from DB and serve.

Is there any API in java to achieve d same? in ADO.net they hv got something like recordset...i dnt know much about that. so is there any way out.my app is based on J2EE and oracle as DB.we hv got jboss as d server.Any suggestion is welcome.Thanks.

+2  A: 

Try using Ehcache, it supports JDBC caching. And avoid creating custom solutions, if you're not JDBC guru.

Shaman
Thanks for the immediate responce.I went through the site a bit and it seems it works arround mostly spring or hibernate frame work.We dont use spring but we do have DAO and service layers.will it be helpful in that case ?I will explore it in next few days and try to find out.Thanks.
KrishnaJesusAllah
A: 

You could cache the results of your query in memcached.

When your application modifies the table that you're caching, delete the cached item out of your memcached instances.

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

sarnold
A: 

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

harigm