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