The gap between EJB3 and Spring is much smaller than it was, obviously. However, one of the drawbacks of EJB3 is that you can only enter a bean so that you can turn components into beans that shouldn't be.
The unit test argument doesn't matter right now - EJB3 is clearly designed to be easier to test.
The compatibility argument above also does not matter: whether you use EJB3 or Spring, you are still dependent on third-party implementations of transaction managers, JMS, etc.
What would change for me, however, is community support. When working on the EJB3 project last year, there were not many people who used it and talked about their problems. Spring, right or wrong, is extremely common, especially in the enterprise, and it makes it easier to find whoever got the same problem you are trying to solve.
fiddlesticks Dec 05 '08 at 13:29 2008-12-05 13:29
source share