Declarative transaction demarcation and implementation