Code examples based on Java EE 7.