On Thu, 2002-09-05 at 11:37, Phase Web and Multimedia wrote: > Greetings, > > I was not able to discern from the docs whether or not JCS would function > well in the following envrionment. > > A little background: > I develop small business websites that are often hosted in a multi > webapp/virtual host environment. I deploy under Tomcat most of the time. I > strive to make each webapp deployable with minimal configuration and no > resource sharing. In other words static classes that can only be > instantiated on a global or App-Server wide level are taboo unless it is > part of the standard and integrated with the container. > > Question: > > Does JCS play nice with other instances of JCS when being deployed in > several webapps under the same server? > I would imagine yes, because Tomcat webapps have there own classpath.
This is something I have been working on. You can now use and instance of CompositeCacheManager directly, rather than through the static methods of CacheAccess / JCS. I would recommend doing things that way, you might look at this Avalon component for ideas: http://tambora.zenplex.org/cgi-bin/cvsweb.cgi/plexus/component-builds/jcs/src/java/org/apache/plexus/jcs/DefaultJCSComponent.java?rev=1.2&content-type=text/x-cvsweb-markup > But, i was just wondering if deploying a jcs.jar and a cache.ccf within each > webapp is possible and safe. I imagine there would be limitations in regard > to RemoteCaching and DiskCache... or would there? Yes, you will have to find a way to make sure they all get different disk root directories if you want to use the disk cache... > Finally, I want my objects to only stay in memory for a specified amount of > time. Can i specify the cache timeout for individual objects? For example, I > have a module that retrieves weather information and stores the info in a > database. Then every hour following that the weather data is updated using > Quartz Scheduler. When a user views the website a call is made to the > database to display the weather info. The weather info appears on several > pages. Would it be possible to set the weather bean to persist in cache and > then timeout every half hour? Sure, either use a region just for that data with that lifetime, or pass in a specific ElementAttributes when you put the object to the cache. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
