Split the channel usage into the three classes of adapter, client and service; corrected the handling of SQL 'end transaction' and 'rollback transaction'.