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" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

Reply via email to