Marc said:
Wow. I think you're the first person i've heard who hasn't said "no way,
ejb3 still isn't as good as spring and hibernate".
what do you love about it? say i'm just starting out and want to ramp up,
get a quickie website going on my machine to kick the tires so to speak, see
what it's made of and how it might make life easier, where to start? what's
ejb3 have to offer that i can't get with a few plain old java objects and
anything else doable under tomcat?
Well, if I were to point out one major thing that I like about it is
extensible persistence context. That's the stateful mechanism that
comes with EJB3 that allows you to retreive information from your ORM
without the use of joins. So essentially you can do....
Query query = em.createQuery("from Customer where customer.id = :id");
query.setParameter("id", 560);
Customer customer = (Customer) query.getSingleResult();
//This is the power of EPC in a contrived example
customer.getOrders().get(4).getOrderItems().get(0).getProduct().getSales().get(3).getStartDate();
I can get any and all information I need on demand without having those
annoying join commands and persistance context destroyed exceptions.
EJB3 you can bundle with tomcat without an application server too.
Also with EJB3 everything is a POJO. So when you said "What's ejb3 have
to offer that i can't get with a few plain old java objects", it
sounded weird to me since everything is a POJO.