text: It is dissolved by the death, dismissal, or resignation of the officer who takes it; and such resignation is not a mere optional right, but becomes an imperative duty when continuance in the service comes to be in conflict with the ultimate allegiance due to the sovereignty of the State to which he belongs.