I have a design issue. I am working on making a J2EE application as
training/practice. I will have a GUI client as a that allows users to
login, register, deposit etc for a bank. At the back end I have a
database with currently 3 tables and above that 3 Entity EJBs to
represent the tables (trying to keep this simple). The Entity EJBs are
customer, checking, savings.
Now in between the GUI client and the Entity EJBs I plan on having
session EJB(s).
My Q is should I have (a) session beans for each type of business
transaction such as "register", "deposit", "withdraw" or should I have
(b) one session bean with methods such as "register", "deposit",
"withdraw"? Does it make a difference?
Thanks for all advice.
Raymond DeCampo - 10 Jan 2006 15:37 GMT
> I have a design issue. I am working on making a J2EE application as
> training/practice. I will have a GUI client as a that allows users to
[quoted text clipped - 10 lines]
> (b) one session bean with methods such as "register", "deposit",
> "withdraw"? Does it make a difference?
If they are stateless session beans, then I do not see a difference. In
that case, group them how you will, although I would tend to one bean to
reduce configuration and client effort.
If they are stateful session beans, then this is entirely a different
question. Then you must consider what the state is and how it might be
shared or re-used across the different methods.
HTH,
Ray

Signature
This signature intentionally left blank.