Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

EJB or Stored Procedure

 
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?
 
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
 
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 ]
 
get schwifty. tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic