• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Entity Clustering

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27863
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic