• 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

Possible to clear or disable JBoss3/EJB2 cache?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I've got a major fire here. Hoping someone can help me out.

We have a legacy app running on JBoss 3.2.5 using EJB. We started running a new version in parallel on the same database. The problem is that the older one is caching a lot of data in memory. So, some updates to the db made from version 2 are not being seen by version 1 and all kinds of bad things are happening.
I've googled on JBoss caching but can't find anything.. at least not for that version. Is there a simple switch or method I can use to force it to go back to the db and refresh data for all finders, etc? I realize this may hurt performance, but that's better than a hosed database.

Any suggestions? Thank you!!

 
dirk johnson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case it helps.. the only config related to caching that I see is this in cache-invalidation-service.xml...


<server>
<mbean code="org.jboss.cache.invalidation.InvalidationManager"
name="jboss.cache:service=InvalidationManager">
</mbean>
</server>

.. I'm trying to research more about it, but it's not helping so far.

Thanks
 
dirk johnson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I've found some info on clustered caching. When an entity in one cluster is modified, it can send a message to the other nodes in the cluster that their cached data is now stale and to invalidate the cache accordingly.
If I could just figure out how to how to programaticaly replicate that process... that might do the trick.

http://www.mastertheboss.com/en/jboss-application-server/130-jboss-performance-tuning-part-2.html

Commit option A can boost your Entity Bean but what happens when running in a cluster ? in a cluster configuration more than one JBoss node will access the same database. Furthermore, they will not only read data, but may also update the db store.Consequently, we now have as many points of write access to the database as we have JBoss instances in the cluster.


For these scenarios, JBoss incorporates a handy tool: the cache invalidation framework. It provides automatic invalidation of cache entries in a single node or across a cluster of JBoss instances. As soon as an entity bean is modified on a node, an invalidation message is automatically sent to all related containers in the cluster and the related entry is removed from the cache. The next time the data is required by a node, it will not be found in cache, and will be reloaded from the database.

In order to activate it, add to your Entity Bean the cache-invalidation tag.



Any ideas?
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having similar problems, although it is happening with JBoss 5 and EJB2. Did you manage to solve this issue and how did you do it?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic