Thomas William Rowley — military officer and civil servant