Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Caching in EJB application

 
Son Java
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are developing a large scale insurance project in J2EE with Swing Applet as Front End and EJB's at the middle tier.Server side call always goes thru session bean to entity bean for add and update. Reading is done from Session bean to database.
We have not yet implemeted any caching mechanism in the GUI as well in the server side.
I would appreciate if some one could give share their idea about practical implementation on caching both in server and GUI sideand point to some URL and sample implementation.
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into the CachedRowSet. Here's a link to an article: http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One trick to investigate is to see if there are any tables in your database that are really and truly "read-only". For instance, in Insurance Applications you often have smaller tables of codes that change very rarely (like on a yearly basis). So, something we've done successfully is to read the entire table into memory as a singleton and have the business logic in the Session Beans use it as needed. There is a more detailed example in this article here:
http://www7.software.ibm.com/vad.nsf/data/document2361?OpenDocument&p=1
Kyle
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IBM has a thing called ACCESS BEAN. Copy Helpers are one of them. A copy helper access bean incorprates a single copy helper object that contains a local copy of attributes from a remote entity EJB. Methods are provided to flush the cache to the actual EJB database and refresh the cache from the actual EJB. Is this thing related?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic