This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Entity Clustering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity Clustering" Watch "Entity Clustering" New topic
Author

Entity Clustering

Ganapathi Srinivasan
Ranch Hand

Joined: Apr 18, 2001
Posts: 41
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

Joined: Jun 25, 2001
Posts: 15962
    
  19

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).]


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity Clustering
 
Similar Threads
Possible to clear or disable JBoss3/EJB2 cache?
Functional query
Diff between HttpSession and Stateful Session bean
entity bean behaviour
Which method is called?