Maximal entropy solutions under prescribed mass and energy