• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JForum 2.1.8 cache implementations and cluster deployment

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I know that JForum doesn't officially support cluster deployment (I discovered it late, it should be clearly stated in the Features and Support pages of this site).
Since cluster deployment is a must for my installation I'm examining how to make it work.
I know that JBoss cache implementation is supposed to work in cluster but I wonder if anyone has never used it: examining the source code it seems that it is buggy!

The CacheEngine interface has this method:

It returns a generic Object so it is not clear how the caller should use it (design bug, I think). The class PostRepository casts the returned Object to a Map so any CacheEngine implementation that doesn't return a Map will not work!
Actually DefaultCacheEngine returns a Map but JBossCacheEngine returns org.jboss.cache.DataNode so it cannot work!

I'm not testing on JBoss because I have to deploy on BEA WebLogic so I examined EhCacheEngine too: same problem, the get() method returns net.sf.ehcache.Cache which is not a Map. Furtermore the Ehcache library included with JForum is very old and doesn't support cluster replication (the latest one does).

Besides this problem with that method the EhCacheEngine doesn't work for some other issue I have not yet solved. Other persons have written about this issue: a call to us.isAdmin() crashes. Also you cannot use the overflowToDisk option unless you change the names of some cache instance in the code.

I've also tried to implement a CacheEngine that uses BEA caching system and I have noted two requisites that are not clearly documented: any cache implementation must have infinite TTL because the code doesn't automatically reload expired data, for the same reason (no autoreload) the cache must replicate across the cluster using copy, not invalidation. BEA cache supports invalidation only, Ehcache supports both strategies.

I'm writing this post to share what I have discovered so far both with other users and with Rafael (I hope Rafael can help to solve this issue) and also to ask if someone has solved cluster deployment issues.

I'm considering disabling caching completely but I suspect it is not a solution and also is not yet clear if it possible. In the config file I see the following options:


I suspect they don't disable all caches, right?

Any help is appreciated.

Thank you.


Pino

[originally posted on jforum.net by Pino.OW]
 
reply
    Bookmark Topic Watch Topic
  • New Topic