Thanks Gavin for responding.
Okay, since caching is done by region, and a region turns out to simply be the class name, I wrote the following code to entirely clear my cache.
Code:
Map classMap = factory.getAllClassMetadata();
Collection values = classMap.values();
Iterator iter = values.iterator();
while (iter.hasNext()) {
ClassMetadata meta = (ClassMetadata)iter.next();
factory.evict(meta.getMappedClass());
}
I am still curious as to why read-write cache doesn't pick up on the changes made to the database by outside applications. I am assuming it is suppose to be able to handle that, correct? I've tested out EHCache and OSCache to see if hibernate behaves differently and it doesn't, so I am guess there is something internal to hibernate that I have configured that is not allowing hibernate to see new changes to the DB from outside sources.
Does it matter that I am not using JNDI? When hibernate initializes within my Tomcat environment, I always see the log "No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)".
I am going to search through the source to see if I can understand this for myself, but any insight you have would help.
Thanks.