Jfg 592 db api in service aware

Merge after pull #491