spring - Connection get/return listener? -
using hibernate , spring, app needs opportunity manipulate connection @ start , end of every database update. our first guess override transaction manager, seeming have side effects intermittent "pre-bound jdbc connection found!" error few other harder describe symptoms.
what best/easiest way oppostunity. saw suggest overriding data source , wrapping connection, best idea? wrapping connection seems dangerous, espceially since websphere has it's own version (wsconnection).
ideas?
manipulation of connection done easiest when datasource.getconnection
done, way know going happen. create datasourceproxy/-wrapper (give name) this. there 1 thing have take care of , is, on close of connection, undo manipulation (if needed is).
instead of creating proxy use aop execute code (like in this answer.
Comments
Post a Comment