struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dusty <dustin_pea...@yahoo.com>
Subject Re: caching Java objects
Date Thu, 09 Jul 2009 04:45:59 GMT

For stuff like data dictionary lists, or other random stuff I don't need to
reload I will initialize on startup and store in the servletContext.  I will
use EhCache for handling cache of model objects when I have a lot of reads
and want to improve performance when there are lots of "things".  

I think it depends on the scope of your need, but my guess is that you are
thinking about application-wide scope, so you are on the right track.  


Disclaimer: I have an irrational fear and allergic reaction to the HTTP
Session map, so I will do probably crazy things to avoid it.  



Mitch Claborn wrote:
> 
> What is the preferred method of caching arbitrary Java objects locally
> in a Struts application?  I've been making my actions implement
> ApplicationAware and storing objects in that Map.  (I think this comes
> from the ServletContext?)  Is that the best way or is there something
> else?
> 
> Mitch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/caching-Java-objects-tp24393862p24403887.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message