issue #153: stored procedures for attaching and detaching contexts
Stored procedures ensure that applications after attaching context commit pending transactions, which prevents race conditions between hived and applications when they are looking for the first event to process.
Edited by Marcin