aspose file tools*
The moose likes EhCache and the fly likes EHCache Server locking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Caching » EhCache
Bookmark "EHCache Server locking" Watch "EHCache Server locking" New topic
Author

EHCache Server locking

sameer sood
Ranch Hand

Joined: Dec 05, 2007
Posts: 30
Hi,

I am trying to improve performance of my application.

The problem we are facing right now is with EH Cahe 1.4.1. Whenever it tries to refresh data from DB. If the Db is slow the whole application gets locked down.

Considering ver 2.4.2 of ehcache which has many improvements obviously, I can see a new parameter 'clearOnFlush'. Just wanted to know if this can help me solve the problem.

Also I am considering changing the strategy used while refreshing data, concurrency-strategy. would be great if someone can suggest which one shall apply here.

Information is not quite clear on net.

Thanks,


Sameer Sood
SCJP 1.5 (93%), SCWCD 1.5 (95%)
Pazhanikanthan Periasamy
Greenhorn

Joined: Jul 18, 2011
Posts: 9
We built a mechanism in my previous project.

It was a high performance web application (website) of a big airline company hosting their enterprise content site.

We use ehcache internally to cache the objects / even HTML fragments for faster rendering.

Static Content (HTML), we cache it indefinitely and ensure that the cache is flushed by the Content Management Server responsible to publish content. It creates a JMS message and pushes the message into a TOPIC configured within WebLogic App Server. Within the application there is generic Cache listener which listens to the topic and receive the message and acts accordingly.

Since the app is deployed in a cluster all cluster nodes receive the message from the topic.

Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

Sameer, to me the problem seems to be with the way that you are refreshing cache. It seems like too many queries are being fired leading to application slowdown.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EHCache Server locking