there was a bug recently fixed for this case - it was due to issue that removal of the session was not sync with data base and thus is left in db. Problem was missing flush after session was removed so you can either patch the code you have now or try out the latest 6.1.0 snapshot.
So once this is fixed, is there anything I need to do in the code to destroy the session or does it happen automatically when the transaction is committed? In 5.4 I had to use a TransactionSynchronizationManager to dispose the session outside of the transaction. In 6.01 / 6.1.0 I am assuming this is no longer necessary, correct?
in case RuntimeEngine is obtained from RuntimeManager within already active transaction then dispose will happen automatically. But when transaction is managed on jbpm level only then you need to follow this sequence:
- get runtime engine from runtime manager
- perform operations on ksession/taskservice
- dispose the engine on runtime manager