• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

EJB 3.0 and Hibernate

 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I heard that EJB 3.0 was inspired by Hibernate. Is this true?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow, that would be amazing that an ORM tool can inspire Session Beans and Message Driven Beans.

Hibernate 3.0 is an implementation of JPA, which is what EJB 3 Entity Beans implement.

Gavin King was a part of the EJB 3.0 Spec team, and I am sure had some help in creating the JPA spec, but to say Hibernate inspired EJB 3.0 would be wrong, and unfair to everyone on that team. All Persistent technologies inspired EJB 3 Entity Beans, why not take the best from all of them and combine them into the super incredible spec that JPA is.

Mark
 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont want to create a new thread for the same topic since my question is related to Hiberate and EJB 3

I never got a chance to work in EJB though I hold SCBCD. I HAD good theoretical knowledge about EJB's but i never had seen it used anywhere in the projects i have involved , not even in other projects in the companies i worked. Why do we need a heavy component like EJB's when we can acheive the same persistance using Hibernate ? How are EJB3.0 and Hiberate related and what are the advantages of EJB3.0 over Hibernate ? yup, i didnt google it, i thought to hear it from the authors

Thanks,
Rajeev
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good question.

What EJB can achieve that other technologies (Spring + Hibernate + POJO etc) cannot?

How to justify the use of EJB?

Thanks.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First what would be pointed out in other places, a question like

"what are the advantages of EJB3.0 over Hibernate"

Would like what are the advantages of Apples over Green Apples?

Hibernate 3.x is an implementation of EJB3.0 or better an implementation of JPA, so it really isn't an either or, it is a question of which implementation of EJB3.0/JPA that you want to use. Use Hibernate is a superset of JPA, meaning that there are some add-ons to Hibernate that has some more features than what is in the spec, but if you program to the JPA spec with Hibernate you have JPA.

Mark
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking forward to a good answer to Bruce and Rajeev's questions.

With all the past EJB failures, it becomes difficult to convince the management that EJB3.0 is really great. Moreover, with Struts-2/Spring, POJO, hibernate combination, many companies are already feeling satisfied. I know of many commercial app running very successfully with this architecture. Moreover, this existing arcitecture DOES have the neat stuffs like, container injection, interceptors, etc - may be not annotations/generics if prior to Java1.5.

Hence, I think there should be a solid reason for why one should think of EJB3.0 and not go with the proven model.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can we say EJB is a standard (part of J2EE) and Hibernate is not?

Is this a reason to use EJB even it is not really superior to Hibernate?
 
author
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All-

(from the related EJB3 versus Spring thread

I posted my general thoughts on this in this thread. As a further comment, I'll say that it is to the JSR-220 expert group's credit that it is incorporating technologies such as Spring/TopLink/Hibernate into the EJB 3 spec and turning them into standards. I would expect further advances in these areas, and in the "next" hot areas, to be incorporated into the spec in the future.

Regards,
Jon
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Becoming a new standard like EJB 3 is always better than several scattered technologies. That's one of the purposes of JCP group: "Making standards".
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bruce Jin:
Can we say EJB is a standard (part of J2EE) and Hibernate is not?

Is this a reason to use EJB even it is not really superior to Hibernate?




Yes and No. EJB is the standard and Hibernate is an implementation of that standard, plus more, which means the more stuff isn't a standard.

Mark
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic