8 Replies Latest reply on Oct 5, 2006 1:51 PM by Alex

    Bulk deletion of CMP Entity bean

    Mark Frost Newbie

      We have employed a simple cache using CMP entity beans.

      We've now identified the need to drop this cache - albeit very infrequently.

      We noticed that bulk updates and deletes form part of the EJB3 spec but for now, what is the best mechanism for doing this?

      We could write a "findAll" method, iterate over the results and remove(). What are the transactional considerations of doing this? If we have many beans could there be issues with database rollback segments becoming very large?

      Effectivley we want to DELETE FROM MY_TABLE and remove all the in memory entities all isolated transactionally from other services that may be currently using the beans.

      Anyone faced with a similar problem?

      Many thanks in advance.

      regard

      mark