What's the difference between:
public class GameController implements Serializable{
@ManagedProperty(value="#{Gamebean}")
private Game game;
and
public class GameController implements Serializable{
private Game game;
public GameController(){
game =(Game)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("Gamebean");
}
and if there's no difference what method is better ? Cheers.