It's not a secret anymore!*
The moose likes EJB and other Java EE Technologies and the fly likes ejb and orm frameworks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb and orm frameworks" Watch "ejb and orm frameworks" New topic
Author

ejb and orm frameworks

Gabor Beres
Greenhorn

Joined: Dec 21, 2004
Posts: 21
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

Joined: Feb 17, 2005
Posts: 704
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.


I think, therefore I exist -- Rene Descartes
Gabor Beres
Greenhorn

Joined: Dec 21, 2004
Posts: 21
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

Joined: Feb 17, 2005
Posts: 704
Great choice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb and orm frameworks
 
Similar Threads
reg: ejb with jdbc
How can we decide whether to go for EJB 3 Entity Beans or with any other ORM Implementation tool
Hibernate, Spring, and TopLink
Detach Before Transaction Completes
difference between hibernate and entity beans?