moved database adapter into a service manager factory