Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which solution is better to a J2EE application?

 
Along huang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me illustrate, for the user register Use Case, here are two access solutions:

1. first of all, client requests for checking if the user name already exist, then check if the user is on the blacklist, if so, the operation will fail, finnaly, client send user infomation to EJB method to register.

2. client directly send user information to EJB to request for register, the EJB method throws a Exception which may throw two kind messages:
A)the user name exist message.
B)the user is on blacklist.

To solution 1, client interact with EJB serveral times, so it consume a lot of net resource. To solution 2, client only access EJB one time, the functionality of the exception is ambiguous and hard to understand.

When I design classes, it is very difficult to make decision.

Please anyone give an idea.
Thanks in advanced
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic