• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tomcat 7 vs. ehCache Standalone Server (Glassfish) Configuration with RESTful Web Services

 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My requirements consist of using ehCache to send and store data via RESTful web service calls. The data can be stored in-memory or via the filesystem...

Never used ehCache before so I am having some issues deciding on which bundle to use.

Have downloaded the following bundles:

* ehcache-2.6.2

* ehcache-standalone-server-1.0.0

(1) What is the difference between the two?

It seems the ehcache-2.6.2 contains src and binaries, which essentially enables one to bundle it with their webapps (by putting the compiled jar or binaries inside the webapp's WEB-INF/lib folder). But it doesn't seem that it has support for Restful web services.

Whereas, ehcache-standalone-server-1.0.0 (comes with an embedded Glassfish server and has support for REST & SOAP) can be used to run as a standalone server. If I my answers to my own question are correct, then that means, I should just use the standalone server?

(2) My requirements are to setup ehCache (with REST support) on Tomcat 7. So, how could I setup ehCache on Tomcat 7 as a separate app with REST & SOAP support?
 
James Dekker
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the 2 Question fixed by myself...

To integrate with Tomcat, you need to do the following steps:

1. To setup tomcat there's some additional things that need to be done:

2. Download ehcache-server-1.0.0 from (not from ehcache.org/downloads - that file is broken):

http://sourceforge.net/projects/ehcache/files/ehcache-server

3. Untar the zip file and rename it to ehcache.war

4. Unzip the ehcache.war file and download the slf4j-simple-1.5.8.jar (this contains the impl - which is required and missing from the war file) and place it inside:

ehcache/WEB-INF/lib/

5. Move the ehcache dir under $CATALINA_HOME/webapps

6. Run tomcat

7. Use one of the example REST calls to test ehcache, here's the URL for the scripts:

http://ehcache.org/documentation/2.5/modules/cache-server
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!