No commissioned officer shall be involuntarily discharged or dismissed from the service, unless by the senate on the recommendation of the governor, stating the grounds for such recommendation; or by the sentence of a court-martial; or upon the findings of an examining board appointed pursuant to section seventy-five of this chapter; or, as provided by section seventy-eight of this chapter, for absence without leave for a period of three months; provided, however, that a commissioned officer may be transferred to the state reserve list or state retired list as provided by section twenty and section twenty-one of this chapter, respectively.