EJB 3: is it good time to start using it?

A

aostrik

Hi ALL,

I want to start using EJB.
Since only JBoss supports that technology,
is it a good idea to start with EJB 3 or the time has not come yet?

Thanx.
 
D

Danno

Hi ALL,

I want to start using EJB.
Since only JBoss supports that technology,
is it a good idea to start with EJB 3 or the time has not come yet?

Thanx.


I love it, so my answer is yes, and if you are designing a web app,
JBoss Seam is awesome!
 
M

Marc E

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?
 
D

Danno

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top