Take the db instance from Grails instead so we can handle replicasets