commit context with resource