UP-4143 EventSession purge fails to page, OutOfMemory can result

From ticket ...
As a uPortal adopter, I would like my portal to not run out of memory when it tries to purge a large number of EventSessions.  JpaEventSessionDao in purgeEventSessionsBefore() attempts to load all the matching sessions and then step through the list deleting them one by one, rather than loading them in smaller batches. This can result in an out of memory.

See uportal-dev@ thread re: http://thread.gmane.org/gmane.comp.java.jasig.uportal.devel/5743 .
Hi Tom.  I haven't looked at this in detail, but from first glance I'm wondering if a better solution is to simply change purgeEventSessionsBefore so that rather than querying and looping through each item and deleting it, that is just does a bulk delete; e.g. something like (this is not correct sql construction) "DELETE FROM " + EventSessionImpl.class.getName() + " e " +
                "WHERE e.lastAccessed < lastAggregatedEventDate".
Since there is no discrimination that I see on the removal, the db can simply do the delete without returning events to the server unless I'm missing something.