java - Automatic cleanup of transaction resources in spring -


i using transactionsynchronizationmanager.bindresource(resource); , assumed after transaction completed, resources cleaned well. (they stored in thread-local , doesn't make sense keep them, , therefore - have thread dirty).

however turns out on completion spring clears transaction sycnrhonization (callbacks), , not resources.

am correct in observation , how make spring automatically cleanup bound resources when transaction completes?


Comments