Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why we need EJB as Servlet can also process business logic ?  RSS feed

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i'n new in j2EE stuff, just wondering, as servlet can do business logic processing , why we need EJB ? is EJB mainly for database processing ? we can also do in servlet right ? thank you very much for reading
 
Prakash Pillai
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alvin,
Advantage of using EJB is you need not bother about transactions,security or connecting to Legacy application.so as end progammer we need not write any logic or code for the same,all these things are taken care by EJB container.

So if ur using some tomcat server or some other servlet container and if your application needs to take care of security or heavy transaction,then u need to code for the same.which is not required in case EJB's.you need to just describe what u want in transaction in XMl file .thatz all

I hope you got difference
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!