Sunny Bhandari wrote:I had that in mind but didn't say that because then he would counter me with question that I can have all those services with Spring also then why take the burden of application server.
That's a perfectly valid question too. The main difference between these technologies is that EJBs are a "standard" which means various vendors follow this standard while providing the services. Effectively, your application that works on a specific vendor's implementation will not require changes to be run on some other vendor's implementation. Ofcourse if you use some vendor specific implementation then that would definitely need porting.
On the other hand, Spring isn't really a standard. But again, if your application doesn't care of vendor lock-in then Spring is a good option too.