Application context in database handler is a good idea

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>