• Post Reply Bookmark Topic Watch Topic
  • New Topic

Some information on session beans

 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Just want to clear some concept about session beans,
EJB is server side component in that we are writing our business logic.till that is fine.

This can be done by using plain java class also but we are using EJB because,
we can deploy EJB in destributed environment,
i.e. we can have different machine on which EJB is deployed and other machine on which our web application is present.
from our web application model we can call EJB's methods for business logic(by getting Home by lookup & creating bean by using Home object).
Same way our database is on other machine(we are calling it as database server).
In this way our total web application is distributed in differnt tiers(we are calling this as horizontal scaling).

due to this if thousands of user is accessing my web application through internet,
(due to this our web app is more scalable)
they can get more fast response compared to if my business logic in plain java class.

this is I understands,
Experts, please correct me if anything wrong.

-Shailesh.
 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shailesh Narkhede wrote:This can be done by using plain java class also but we are using EJB because, we can deploy EJB in destributed environment, ....

There are lot more EJB can provide. They run in a managed environment (i.e: there lifecycle is controlled by the container like pooling the stateless session beans etc..) and we get all the good things like transactions, security etc.. And we can reuse the EJB component anywhere else where the logic is desired.
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vijitha for reply.... and more information given on EJB.

this means What I understand is correct .....
with that EJB provide more facilities to developer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!