jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smuts, Aaron" <Aaron.Sm...@travelocity.com>
Subject RE: JCS
Date Wed, 11 Jul 2007 20:43:07 GMT
Typically, one instance of a servlet is created and the container
directs traffic from multiple threads to that instance.  The container
will keep a reference to the servlet, so it will not be garbage
collected.  Neither will the cache, since it will be transitively
referenced from the servlet.

Aaron

> -----Original Message-----
> From: Chris Rocker [mailto:chrisrocker90@yahoo.com]
> Sent: Wednesday, July 11, 2007 4:28 PM
> To: JCS Users List
> Subject: RE: JCS vs. EHCache
> 
> Aaron,
> 
> Thanks for the quick feedback.
> 
> Unfortunately, we can't avoid SOAP - it's a customer (huge customer)
> requirement.  If we don't support SOAP, we're out.
> 
> For the images, yes, we are  fetching them from a far off place. So I
> think it's a good idea to use the cache.
> 
> Wrt to question the singleton instance, objects that I've created in a
web
> service call don't last beyond the invocation.  I do have them scoped
to
> the request. I understand the singleton design pattern, but in the
context
> of the request/response, if I create the cache within the web service,
> doesn't it disappear afterwards? I guess I don't understand how a
static
> factory would be handled within Tomcat.
> 
> Chris
> 
> 
> 
> "Smuts, Aaron" <Aaron.Smuts@travelocity.com> wrote: 1.  You are
writing a
> java program.  It doesn't matter if it is a
> service or a web app or a standalone app.  Why wouldn't a singleton
work
> in a webservice?  I don't understand the question.
> 
> 
> 
> But I strongly suggest that you avoid SOAP if possible.  It's simply
> hideous.  Just make a simple REST or xml / http service.  If you are
> serving images, wouldn't it be nice to be able to request them with a
> nice query string and to get back an image rather than a soap
> attachment.
> 
> 2.  Why are you caching images?  Are you creating them or fetching
them
> from some far off place?  If not it would be better to setup an image
> server that could server the static files.  If so, the go ahead.  Byte
> arrays would be easy.  I assume that you'll have lots and will want to
> use the disk cache as a swap.
> 
> 3. No.  They added eh over 4 years ago. See:
> http://jakarta.apache.org/jcs/JCSvsEHCache.html
> 
> 4. See 2.
> 
> 5.  Yes, no matter what.
> 
> Cheers,
> 
> Aaron
> 
> > -----Original Message-----
> > From: Chris Rocker [mailto:chrisrocker90@yahoo.com]
> > Sent: Tuesday, July 10, 2007 4:48 PM
> > To: jcs-users@jakarta.apache.org
> > Subject: Fw: JCS vs. EHCache
> >
> > Hi,
> >
> > My company is planning to implement a cache for images. This
interface
> to
> > this cache will be implemented a Web Service (.war file, SOAP,
etc.).
> We
> > are using Java 1.4, Apache/Tomcat 5.028 for reasons of backward
> > compatability with some binaries (this may change). I've come across
> JCS
> > and it looks good, but I'm not sure if it's a good fit. So, please
> bear
> > with my newbie-ish questions:
> >
> > 1) How does the cache persist between web service calls? I guess
it's
> > using a static singleton - will this work with a web service?
> >
> > 2) Should images, in fact all binary data, be stored as byte arrays?
> >
> > 3) Did ehcache replace JCS in hibernate, and if so should I be
worried
> > about this?
> >
> > 4)   Is what we are trying to do appropriate for JCS?
> >
> > 5) Is JCS a better choice for our purposes than ehCache?
> >
> > Thanks in advance for your helpful advice for this evaluation
process.
> >
> > Chris
> >
> >
> >
> >       Fussy? Opinionated? Impossible to please? Perfect.  Join
> Yahoo!'s
> > user panel and lay it on us.
> >
> >
> >
> >
> >
> >
> >
> >
>
________________________________________________________________________
> __
> > __________Ready for the edge of your seat?
> > Check out tonight's top picks on Yahoo! TV.
> > http://tv.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------
> Boardwalk for $500? In 2007? Ha!
> Play Monopoly Here and Now (it's updated for today's economy) at
Yahoo!
> Games.

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message