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

Entity Clustering

 
Ganapathi Srinivasan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
We have a small problem. We have a couple of data objects which are almost static i.e. the data in them can be changed very rarely. Moreso changes to the underlying table will be done by an external class and not thru the entity bean. The question is how do we optimize the database reads for these?
In case of entity bean , then it will read the DB always. Is there a way by which the container can be used to broadcast changes to the other instances of the entity bean in a cluster?. Or is there a way you can limit a certain entity bean to be loaded into only one instance in a cluster so that all other references are routed this instance?. This is basically to optimize the DB reads as the data will not be changed that often.
Hope I am clear.
Thanks and Regards,
Ganapathi.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18166
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd want to take advantage of vendor-specific features, most likely. Some EJBs support an isModified() method that the container can query in order to know whether to update the DBMS. Check your docs for info on read-only beans. Beyond that you might want to tune the caching, depending on how many bean instances are going to be present.
Not all containers support read-only beans. In that case you'd need to create BMP beans with no logic in the ejbStore() method.
[This message has been edited by Tim Holloway (edited August 28, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic