I learned EJBs first and I love them.
Later, I learned Spring and it seemed like
alot more work.
The benefit with Spring is that you can much easier
test your Spring code than you can your EJB code but I have never really had any issues testing my EJBs via SoapUI.
So I stuck with my EJBs. '
But one of the replies is correct, almost all jobs want Spring programmers. I almost never see someone wanting EJBs.
I suspect most companies started writing their apps before EJBs were as good back with JDK 1.4 as they are now and so they are invested in Spring.
I am sure there are companies who started their projects after EJBs became good but I suspect they saw all the Spring stuff and thought Spring was the best way to go.
or maybe I am wrong that EJBs are better. But since I have not been hired to do this kind of work for a company who has the project on the Internet with thousands of users, I dont know.
So, with all that said, I am an EJB programmer and have never been hired to do it.