Maybe I am missing something, but this sounds like a data model that should live in a database.
That way, you could have your database layer (iBATIS or Hibernate) cahce it for you, and use standard APIs to get to the data. Larry On Apr 11, 2005 11:59 AM, Daxin Zuo <[EMAIL PROTECTED]> wrote: > > Stefan, > Thank you for your reply. It is very helpful. I may use a CACHE as you > mentioned. > I like to ask another question. > 1) The object I am going to cache is large, and dynamically changed > according to users actions. > 2) Currently our program runs with Tomcat/Apache, it has to support other > java application servers -- Weblogic, ..., and different platforms -- > Unix, > Linux, Windows. > > Do you have instruction for the selection among the various CACHE plug-in? > > Thanks again. > > -----Original Message----- > From: Stefan Frank [mailto:[EMAIL PROTECTED] > Sent: Monday, April 11, 2005 12:04 AM > To: 'Tomcat Users List' > Subject: RE: Application Data sharing -- store large object? > > You should maybe take a look into the various caching-libraries available > (ehcache, swarmcache, jboss-treecache etc.) - these libraries deal with > cacheing, which is a little different from what the > application/session-objects offer, as application and session have to be > absolutely reliable. If you store something in it, you can safely expect > to > find it again. Therefore, this objects cannot deal with things like > running > out of memory - they cannot simply throw out objects, when things get too > crowded. > > On the other hand, Cacheing-Systems always have policies to deal with such > situations(eg. Swarm-cache dynamically adapts to your usage-patterns) and > can throw out old or un-needed objects, whenever it gets too crowded - > therefore, you cannot always expect an object that you put into the cache > to > be still present after a while - so you have to deal with refetching it, > when you have nop cache-hit. You may want to look into O\R-Mapping > Frameworks like hibernate: they already have these caches built in and > take > care of re-fetching objects, when they have expired from the cache. > > From a pure memory point of view, there is no difference. If you > absolutely > need your complex object 100% of the time, it makes no difference, if you > keep it in the application or if you put it in an in-memory cache. > > Hope this helps > stf > > > -----Original Message----- > > From: Daxin Zuo [mailto:[EMAIL PROTECTED] > > Sent: Sonntag, 10. April 2005 19:23 > > To: Tomcat Users List > > Subject: Application Data sharing -- store large object? > > > > In my program, an object that contains a large amount of data > > (complicated data strustures) is used in many pages. When I > > start doing it, I heard that it is better to not store large > > object in Application. So I let the program create a new one > > when ever this object is needed. Now I like to question if it > > is good to put this object in Application. > > > > Thanks. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
