I'm currently reading Spring in Action from Manning, I've got Pro Spring on its way from Apress, and we recently adopted the Spring Framework at work. Spring has so many benefits over Enterprise JavaBeans that I have to wonder whether it really pays off to do a new edition of a book on EJB 2.1? Sure, the first book to cover the forthcoming EJB 3.0 will probably be a bestseller and all that, but 2.1?
Having said that, Spring is still not perfect (nothing is, after all) but its XML configuration files are still much easier to deal with in terms of testing, for example, than EJB's deployment descriptors and the container (although you can do pretty much with MockEJB).
I'm not saying it's very hard. I'm saying testing EJB's is more difficult than testing plain old Java objects (which is kind of self-evident).
As I said, you can use MockEJB to test your EJB components without a real container as well and the amount of pain required to test your EJB's is largely dependent on the practices used in constructing the EBJ's. For example, if you're just using EJB's for declarative transactions, you could easily just delegate everything into a POJO and test that instead.
In the end, there's always some things that you simply must test with the real container and other infrastructure.







