Where in your code are you attempting to catch the exception and what does your catch declaration look like?
If the Exception is occurring at the end of the transaction you can attempt a flush() call during the transaction and catch the exception at the point of the flush() call.
--Gordon
[Message sent by forum member 'gyorke' (gyorke)]
http://forums.java.net/jive/thread.jspa?messageID=207418