This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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.

I agree. Here's the link:
subject: One Session Bean is enough for whole application