I believe we're doing this for the same reason as we do it in UserDaoHibernate - w/o it, the DataIntegrityViolationException doesn't get thrown until the transaction commits. Since the transaction commits after the save method ends - and we're trying to catch DataIntegrityViolationException in UserManager.save(), we need the flush in there.
Of course, if you find a better solution than the one we're using - we're more than happy to change the code. Matt On 6/9/07, VJ22 <[EMAIL PROTECTED]> wrote:
Hi, The latest source code for userDAO jpa has an explicit call to entityManager.flush() and is not within a @Transactional annotation ?? Any specific reason , is this due to the cache setup for the user entities ? Thanks...VJ -- View this message in context: http://www.nabble.com/Why-entitymanager.flush%28%29-and-not-%40Transactional---tf3893452s2369.html#a11037829 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
