• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

EJB and Hibernate  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB technology. I have little knowledge on Hibernate. Hibernates also works on Object relational maping and so objects are made persistant so can we say that EJB is obsolate? Shall I continue studing EJB? How can I compare these two?

Thanks.
Sachin.
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

As i understand it - i am also new to both EJB and Hibernate :-)

is that EJB is divided up into 3 main sections, i.e. Session EJB beans, Entity EJB beans and Message driven beans

Hibernate is a representation of database tables using java classes i.e. using a database in an object orientated way.

Session beans are a single transaction with the user with no direct database involvement

Entity beans represent entities within a persistant storage (for example a database). Entity beans have direct database involvement and can use EJB-SQL.

Message beans are used by a client to send a message to a bean and doesnt really care if the data gets to the client or not.



Entity beans is most like Hibernate. So Hibernate represents 1 section out of 3 of EJB

EJB 2.0 doesnt use Hibernate so what i would (and plan to do) is to study and understand EJB 2.0 with SQL

The newest version of EJB (3.0) doesnt have SQL for Entity beans but rather uses Hibernate to do database involvement.

I hope the above helps :-)

Niall
[ March 24, 2007: Message edited by: Niall Loughnane ]
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by sachin pachpute:
Hibernates also works on Object relational maping and so objects are made persistant so can we say that EJB is obsolate? Shall I continue studing EJB?



HFEJB has 12 chapters about EJB. Only 2 of them are about Entity Beans. If you like to go Hibernate, forget those 2 chapters (actually read them too ) and concentrate on the 10 other chapters.
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJB 2.x Hibernate is a replacement for Entity Beans, plus a whole lot more.

In EJB 3.x Hibernate is an implementation of the JPA spec, plus a whole lot more.

Mark
 
sachin pachpute
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for giving time,
Sachin.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!