Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity Beans - Yes or No  RSS feed

 
Rajat Nayer
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heard a lot of flak on Entity bean usage. Why is it so . Have never got very clear answers. Could someone list the reasons of why and in what scenarios is it not ok to move forward the Entity Beans way.

Regds
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The current model of entity beans incur a lot of overhead because of their complicated life cycle. They also come with remote and home interface which add to more confusion to developers (EJB 3.0 has done away with the home interface and remote i/f is POJI)
Domain class in Hibernate are simple java beans which is easier to code rather than use Entity beans.

Please check this link,it is intersting read

http://www.theserverside.com/discussions/thread.tss?thread_id=13664
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Entity bean is good design/concept but performance of entity bean is not good.

Now, i use hibernate because it's easy to use, easy to control, configuration and fast to work.
[ July 21, 2004: Message edited by: somkiat puisungnoen ]
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another issue is the selection problems. If you need to retrieve lots of records, say 1000 records, you will then have 1000 objects. Even though you can avoid this by using home business methods (finder or selector methods), you will then need to know about EJB-QL. In addition, if the records for display required other tables' values, performing a join or more joins makes the performance much more slower!

Nick
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
an excellent book in this:
Expert One-on-One J2EE Design and Development (Programmer to Programmer) - rod johnson
looks like i am starting to promote this
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!