• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need for ejb

 
Arun Prasath
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we go for ejb first of all?
is there anything which can't be done using servlet and jsp?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are lots of things EJBs do that a servlet container can't do. It's not just about the code that they execute. It's also about all the other services an EJB container provides, e.g. transaction handling, load balancing, monitoring, etc.

In addition to that, EJBs are an abstraction. Sure you can write servlet/JDBC code that does the same thing, but then, you can write assembler code instead of Java. EJBs free you from thinking about certain aspects of the system as a whole, since the EJB container worries about them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic