Allow to add handlers that are executed just before the provider callback is called. This can be helpful, for example, to close db connections.