Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB or Stored Procedure

 
Asman More
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can stored procedure give better performance than an entity bean? (considering the stored procedure does not do a bulk insert).
Also, is there any real performance lose in implementing most of the inserts in the database by entity beans?
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am not sure on what basis you are trying to compare stored procedure with Entity bean.Both are having own uses.
I m not sure it will be Feasible to compare both or not.
James
 
Francis Amanfo
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Asman,

Entity beans have been already badly condemned by the community and everybody is going away from it. Please stay away from it to avoid misery.
For the persitence layer, I'll advise you to adopt Hibernate (http://www.hibernate.org). Even Sun is copying hibernate's ideas for EJB 3.0.

Having said that, I don't think you can compare stored procedures with a persistence framework like hibernate or entity beans. It's like comparing apples with oranges. With persistence frameworks, you get your data from the datastore as objects for manipulation. I think your question should be whether to do direct SQL queries from your application to the database or go via stored procedures.
As I don't know the scope and scale of your application, this is all I can say.

That's just my 0.2 cents.

Best regards,

Francis.

[ May 13, 2004: Message edited by: Francis Amanfo ]
[ May 13, 2004: Message edited by: Francis Amanfo ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic