File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes object caching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "object caching" Watch "object caching" New topic

object caching

Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
I have objects which hold rarely changing data. Ideally I'd like these objects to be loaded when Tomcat starts up, but have had a difficult time finding anything on google that is helpful. So far, I've only read about other frameworks that do this. Is there an easier way?
[ November 07, 2005: Message edited by: Chris Montgomery ]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
If I understand your problem correctly, you might find WhirlyCache to be helpful.
Whirlycache is a fast, configurable in-memory object cache for Java.

Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Is your problem concerning how to implement caching, or how to do anything
at start up in a web app? If it is the latter, you could always define a
servlet, set its load-on-startup property in your web.xml to 1, say, and then
in the servlet's init method, do whatever you need to do on application startup.

There is no emoticon for what I am feeling!
Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
the servlet load-on-startup is perfect.

I agree. Here's the link:
subject: object caching
It's not a secret anymore!