2 Replies Latest reply on Jul 18, 2008 1:07 PM by Brian Stansberry

    How to evict know out of date objects (after SQL statement)

    Vera Mickael Newbie


      I intend to use jbosscache as level 2 cache with EJB entites.

      Cache evictions are done only when a modification occurs inside the EntityManager.

      But for performances reasons it may be usefull to send SQL statements that modify database, for example you may want to delete hundreds of objects in a single SQL statement instead of getting all objects iterate over them. Update of objects is also possible.

      Suppose I know (in the same transaction) which objects are modified or deleted. Is there any way to send this list to JbossCache ?

      If this is not possible, what is the solution ? Is it possible to use cache level 2 with entities when databse is modified outside of the entity manager ?