Pass in the instance of the resource instead of just a connection.
We'll delegate the connection to the resource. This allows us getting rid of weird setter injection for context of blocks for hooks and handlers.