Add callbacks for life cycle phases on stateful objects