It might be nice to be able to run multiple instances of the cache, but that is completely unnecessary to solve this simple problem.
You don't need multiple instances of the JCS caching system, you just need to use different regions. The entire system is built around the idea of separate cache regions with configurable behaviors. Think of the JCS class as a cache access class. It is just a wrapper around the GroupCacheAccess. The cache is a hub that manages auxiliaries and regions. You just need to use different regions. Get different JCS access objects for each webservice. It may be confusing that the access class is called JCS. Aaron > -----Original Message----- > From: James Taylor [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 06, 2002 1:55 PM > To: Turbine JCS Users List > Subject: Re: More than 1 cache-instance needed > > You cannot currently. JCS is a singleton and thus within a classloader > you can only have one cache. You could construct your region names in > such a way that they are unique to a webservice. > > Best bet is to make JCS no longer exclusively singleton, and just > provide a singleton wrapper -- as has been done with velocity. This > would facilitate using it in a component oriented system (avalon!) > > Any help in this direction would certainly be appreciated =] > > On Thu, 2002-06-06 at 12:00, Maarten Coene wrote: > > Hi, > > > > I have a problem configuring my application. > > > > I have a component which can talk to a webservices (retrieve info, > etc...). > > I want to use a cache for this to avoid too many (slow) network-traffic. > > There can be more than one such webservice, so I can create multiple > > component-instances (each instance can only talk to one webservice). In > the > > constructor of my component, I create a cache like this: > > > > cache = JCS.getInstance("myWebserviceRegion"); > > > > But this had as a side-effect that all my component-instances used the > same > > cache (if I added something to the cache in one component, it also > existed > > in the cache of another component). I don't want this: I want a seperate > > cach for each webservice (different instances talking to the same > > webservice may use the same cache, but different instances talking to > > different webservices must use a different cache). > > > > How can I accomplish this behaviour? > > > > Thanks, > > Maarten > > > > -- > > Maarten Coene > > Katholieke Universiteit Leuven > > Dept. Computerwetenschappen Tel: ++32 (0)16/32 78 25 > > Celestijnenlaan 200A > > B-3001 Heverlee > > > > > > -- > > To unsubscribe, e-mail: <mailto:turbine-jcs-user- > [EMAIL PROTECTED]> > > For additional commands, e-mail: <mailto:turbine-jcs-user- > [EMAIL PROTECTED]> > > > > > > > > -- > To unsubscribe, e-mail: <mailto:turbine-jcs-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:turbine-jcs-user- > [EMAIL PROTECTED]>
