The general rule for jurisdiction over the person:
In general, a person becomes subject to court–martial jurisdiction upon enlistment in or induction into the Armed Forces, acceptance of a commission, or entry onto active duty pursuant to order. Court–martial jurisdiction terminates upon a valid discharge.