[jboss-user] [Clustering/JBoss] - Re: stored procedures + distrib cache + ejb3 + hibernate

bstansberry@jboss.com do-not-reply at jboss.com
Thu Jan 17 13:01:51 EST 2008


Probably not.  If your stored procedure updates any entities that are cached in the 2nd level cache, Hibernate has no way to know about the update and thus can't invalidate those entities out of the cache. The cached entities thus contain out of date data. (Similar problem applies if you are caching query results.)

When you execute a native SQL statement, Hibernate parses it to see what tables are affected and invalidates all entities from the 2nd level cache that are associated with those tables.  But if you are executing a stored procedure, Hibernate doesn't know what will happen.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121049#4121049

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121049



More information about the jboss-user mailing list