aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes One Session Bean is enough for whole application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "One Session Bean is enough for whole application" Watch "One Session Bean is enough for whole application" New topic

One Session Bean is enough for whole application

Mohamed AshrafM

Joined: May 22, 2001
Posts: 5
Now, I am doing one small project in j2EE Server with oracle.I have divided my project into 3 module. i'm using jsp for view, javebean for controller, session bean for session handling and entity bean for model.What my doubt is, one session bean is enough for whole project or separate session bean need for separate module. If i use one session bean for whole project, what will happen? will Problem come? or i have to use separate session bean for appropriate model?
my project scenario is
Jsp<-->javabean<--->session bean<--->Entity bean

Jsp calls javabean, Javabean calls session bean, session bean calls entity bean. Entity bean gives output to session bean,session bean give it to java bean and java bean to jsp.
This model is correct??If more than one user/same user access at same time, what will happen..Deadlock condtion will arise.If arise, how do we handle this??
Please, anyone remove my gloom.
Thanks in Advance.
with regards
Mohamed Ashraf

Joined: Jun 28, 2001
Posts: 2
hello Mohamed AshrafM,
i have made some applications, and my experience say that you should use as many session beans as whole operations you use. It is not a good solution using a powerful session bean who response to any question.
In fact a session bean is used to make operations using entity beans, but if you have different functional operations, is better working independently.

It is sorta covered in the JavaRanch Style Guide.
subject: One Session Bean is enough for whole application
Similar Threads
Let's discuss a j2ee design pattern problem
Test 488 questions
long post IBM.158
Ejb Project Plan
few doubts in MVC design pattern and EJB Concepts