Since the time that we implemented that, we added logic (the
RuntimeExceptionTranslator interface and its implementors) that takes
care of translating from internal exception types to spec-defined
exception types across the board. We certainly could move the logic
for
logging at the trace level from BrokerImpl.afterCompletion() to that
boundary code. Since we (try to) guarantee that all exceptions that
make
it to the user pass through the PersistenceExceptions class for
translation, that would be a nice uniform place to do the work.
Exception translation isn't 100%, though. For example, when someone
grabs the Connection from us and uses it, we don't do any exception
translation.
I don't mind logging exceptions in trace mode, but I do think it's
very difficult to maintain complete coverage without any duplicate
exceptions being logged. And I still feel that given our strategy of
always nesting the original exception as the cause of the exception
we throw to the user, it's mostly unnecessary.
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.