I have an app that use transaction weaving and contains several readOnly paths currently annotated as follows
@Transactional(readOnly=true) private void doSomeQuery()
I've recently run into the odd issue where during a commit for these methods, the connection to the underlying database was lost and due to the failure the woven transaction code raised an exception.
From my perspective however, all the work was already done and the query results had been retrieved. There was nothing to do about the commit failure in this case.
What do folks do to handle this type case in general? I.e. is there some way to have the commit failures only logged and to not raise? I'd hate to have to wrap all of these methods in a try-catch or abandon the transaction weaving. Thanks Ben
|