Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb and orm frameworks

 
Gabor Beres
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I find current top orm frameworks such as hibernate, far more sophisticated, than
2.1 ejb enity beans.
Could you give me some information about how to get them working together?
Should i completly ignore entity beans and use POJO, or use bmp with hibernate code inside it?

thanks for any help.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gabor,


I find current top orm frameworks such as hibernate, far more sophisticated, than 2.1 ejb enity beans.

Arguable whether they are more sophisticated or not. One might say that from a syntax standpoint CMP entity beans are lighter than orm tools. From a design, maintenance and configuration standpoints (by the way, do you really like the abstract schema & EJB-QL? ) ejbs are far more complex. However not this is the point. The point is that EJB 3.0 is knocking to the door and you better become familiar with pojo & orm tools, since this is exactly what ejb will become.

Could you give me some information about how to get them working together?

They are not intended to work together. Actually Hibernate has its own transaction management and as you know BMT is not allowed with entity ejbs. Hence I�m not sure if you ever can integrate both technologies. If you want truly orm with ejbs, then you better wait for a while till the ejb 3.0 will be officially released.

Should i completly ignore entity beans and use POJO, or use bmp with hibernate code inside it?

If you have the freedom to chose than go with pojo & hibernate. At least you�ll have a glimpse of the future.
Regards.
 
Gabor Beres
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. i now understand why it is not possible to put hibernate code into entity beans.
However, i think i could still go with the session bean + orm framework aproach.
This way, i could still benefit from the high availability of the container.
Thanks to spring, i could even perform declarative transactions.

if i'm wrong, please correct me.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great choice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic