users@glassfish.java.net

Clear Cache?

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 Sep 2009 11:12:10 PDT

Is there a way with Glassfish to clear the cache of a specific entity bean? What's happening is that when I recompile and redeploy a war, an entity starts giving errors that "com.x.MyClass cannot be cast to com.x.MyClass". The class in question has not been changed (has a serializationUserialVersionUID of 1L). My assumption is that the beans in the cache are the problem. Restarting Glassfish solves this of course, but that is not an acceptable solution.

Ideas?

In my JBoss days, there was an MBean (JMX?) that could be called to clear all the entity caches. Something like that would be ok, or if there's a way to clear just the entity cache in question, that would be better.
[Message sent by forum member 'culli' (jim.cullison_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=364453