Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: Shared cache best practices?

Steven Warren

2004-01-08

Replies:

Message
Entity beans are not really a good solution for any situation and I think should be culled from the herd of J2EE. I don't recommend you go down that path as it will not likely give you good performance, scalability, or reduced complexity. I have a large CMP Entity Bean application (luckily successful) and I am warning you away from this approach.
 
I didn't really hear enough about your situation to suggest a good caching mechanism. The approach I took was to front my EJB calls with a wrapper who returns cached data if the data has not been invalidated, when data is posted, objects in the cache are invalidated via a notification to each invalidated cached object (objects register to be notified when they are put in the cache). But again, I don't know if this is applicable to your situation.
 
Regards
Steve
-----Original Message-----
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@JAVA.SUN.COM] On Behalf Of Erik Beijnoff
Sent: Thursday, January 08, 2004 12:38 AM
To: J2EE-INTEREST@JAVA.SUN.COM
Subject: Re: Shared cache best practices?

Thanks for the responses. You've been verry helpful. I've gotten some alternative approaches to think of it, and those of you who have answered seems to lean towards the Entity Beans approach.
 
Depending on your container, you may get automatic invalidation for free -  
> by using the appropriate "commit option" (without needing JMS).  
> This is all assuming that all modifications to the tables that have the cached data are being done through entity beans. 
> In any event, it seems entity beans would be a good fit. You will need to decide whether to
> keep your strategy of separate caches per web server (which will mean an app server local to each web server).
 
For the moment I am not using Entity Beans or EJB. Just a domain model made out of Pojos manipulated through a DB Peer, so it's really not an app server for each web server, rather several web server with caches. If I where to use Entity Beans, do they make a good joob replicating over several servers, or can I expect the app server holding the Entity Beans to become a bottleneck in the future?
 
Best regards Erik Beijnoff
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

©2008 junlu.com - Jax Systems, LLC, U.S.A.