So it sounds like you have some sort of ajax auto complete search field? If that is the case, this is going to need to be a combination of openjpa.QueryCache and openjpa.DataCache I believe. I'd suggest reading through the docs[1] and creating a small sample before you try to use all 200K items. The properties you'll need to set to get the cache going are: [openjpa.DataCache=true , openjpa.QueryCache=true].
HTH Thanks, Rick [1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_cache_conf On Mon, Sep 20, 2010 at 12:51 PM, brian.fed7 <[email protected]> wrote: > > I am newbie to OpenJPA and have couple of questions on how to implement > Data > Caching using OpenJPA > > Here is our application requirement. Basically ours is web based j2ee > application that uses JSF,Spring,OpenJPA and Oracle database. In our > application UI screens we have a search screen where if the user enters a > few letters of "code" then the matching codes need to be picked from the > "CODES" table and shown in the UI. The CODES table holds 200,000 records. > We > do not want to hit the CODES database table for searching this table > whenever the user enters few characters in the UI screen since the > application response times will be higher if we do it that way instead we > want to cache all the 200,000 records records using Caching functionality > provided by JPA and OpenJPA and increase the application response times so > that it does not take more than 10 seconds or so whenever users enters few > letters of "code" in the UI screen then the search is performed on the > "codes" (all the 200,000) data that is cached rather than hitting the > database for each few letters typed in the UI screen. >
