sam98uele / DB2Project_EJB

3 stars 0 forks source link

EJB Architecture #2

Closed sam98uele closed 3 years ago

sam98uele commented 3 years ago

Need your Opinion if it is a good Idea.

I've created:

Note that they are needed because we have "Stateless" and "Stateful" EJB.

alessandriniluca commented 3 years ago

I Agree with your decision. The only thing is about productUserService. Whad does the user see after have completed the questionnaire? if user who has already compiled and submitted (or canceled) the questionnaire see different things, maybe this one could be stateful, because depends on the specific user

sam98uele commented 3 years ago

@alessandriniluca ProductUserService is used by the user to retrieve and display the Product of the day (needed by the Web to display the homepage, and also the other users reviews). After compiling the questionnaire the user sees only the homepage, with the product of the day and the other users reviews. But he cannot compile anymore the questionnaire, so, a method is present to check if a response is already present in the DB: productQuestionnariePresent(Integer userId);, and if true the button to compile the questionnaire is not displayed.