Definitely Spring is much much ahead of EJB 3.0 (perhaps EJB 3.1 comes closer to that) in terms of flexibility and development effort goes. Ofcourse EJB 3 is much improved from its earlier versions, but from my experience working with EJB 3, I still find that to run a small application with some session beans, I have to up my server (EJB container...like Weblogic,
JBoss AS) and initially I ran into problems like NamingExceptions and much more which I do not remember now. But to the contrary, Spring was much more easy to set up and
Tomcat was more than enough to power up my web application which uses Spring middleware and moreover I didn't need an app server to
test my middleware components.