login
Blurts on the Art of Software Development

Today | RSS | RDF | Atom | Other Tags
Categories : All | All | CI | .NET | General | Humour | Java | Personal | Reviews | Ruby | SW Eng

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).


Heh, am I the only person in the world who doesn't find testing EJBs to be very hard? Maybe it's my choice of container, which isn't dog-slow.

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.



Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 9 + 9 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/lasse/addTrackBack.action?entry=1108811542000