Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic

Need to persist data in JVM....

abhishek paul
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator

I have a requirement in my project where once the user logs in, the database is queried and some information
related to the user is retrieved and stored in JVM.So the number of hits to the database is decreased.

The requirement in detail :

This is Simple Cart-Shopping application.
There is a UI which displays various products which one can view and purchase.

1)Once the user logs in he can view the various products.
2)There are restriction which decides which products that particular user can purchase,
although a user can view all the products listed in the store.
3)Every time a user clicks on a product, database is queried to retrieve access info for the user on that product.
4)If a user has proper access only then he can purchase the product.

Presently the database is queried in all the four steps explained above.

I intend to :

Hit database once user logs in and retrive information regarding the access levels of the user for all products listed in the store.
Persist this info in JVM(serialization or by other means...).
Now for any further access info, the persisted objects will provide the data.
This reduces the database hits.

Other details :

App Server - Jboss
Database - oracle
Expected Concurrent users - 2000 - 3000

Please provide your suggestions as to what should be the ideal approach.

Joe Ess
Posts: 9323
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
    Bookmark Topic Watch Topic
  • New Topic