File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity Clustering" Watch "Entity Clustering" New topic

Entity Clustering

Ganapathi Srinivasan
Ranch Hand

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

Joined: Jun 25, 2001
Posts: 17410

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

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Entity Clustering
It's not a secret anymore!