Jan 8, 2006 session bean question

D

Dakota Mon

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.
 
R

Raymond DeCampo

Dakota said:
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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top