• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJBs vs Stored Procedures vs Plain JDBC

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I belive this issue had be raised several times, the use of EJBS has been questioned alot later, the question is when to use EJBs? and what are the benefits you get over using other solutions (stored procedures, JDBC ...), and what will ou lose if you if you went for other solutions?!!
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"knasser",
Your display name does not comply with our naming policy. You can change it here.
Thanks.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding your question, that is a FAQ. Search this forum or take a look at these threads for example:
https://coderanch.com/t/311236/EJB-JEE/java/When-EnterpriseBeans
https://coderanch.com/t/312178/EJB-JEE/java/usage-ejb
 
Karim Nasser
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
unfortunately none of these links answered the question or even discussed it thoroughly!!
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you are confusing EJB with Enity Beans. There is nothing stopping anyone from using EJB + JDBC or Stored Procedures. Furthermore, you could even utilize plain JDBC or Stored Procedures from BMP. So it is not a simple either or question. However, I do routinely point out that EJB is massively inappropriate for most projects, especially simple web applications.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kareem, you're correct about the links not answering your question. I stopped at "when to use EJBs" and the FAQ flag was up... Sorry about that.
However, the suggestion to do a search on the forum was/is valid. This time, having read the latter part of your post, I'll try to pick a little more appropriate links for you:
https://coderanch.com/t/310036/EJB-JEE/java/Entity-Beans-Vs-JDBC
https://coderanch.com/t/310252/EJB-JEE/java/EJB-vs-JDBC
https://coderanch.com/t/311894/EJB-JEE/java/Entity-Beans-REALLY-only-Low
https://coderanch.com/t/312191/EJB-JEE/java/JDBC-Reading-Vs-EJB
 
Karim Nasser
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chris, you didnt get my point, what I am talking about is the advantage of using Entiy beans over SP, when we talk about EJB we usually mention "Transactions" ,"security" and "Disributed preocessing".
"transactions" : can be achieved in SP with the same simplicity as container managed transactions ...so it is not a big advantage
"security" : J2EE only offers class based security which is not suitable for most enterprise applications
"distributed proccessing" : looks like the main advantage of using entity beans over stored procedure , but you can alos wrap the stored procedure in a Session bean and you get it.
The OO programmer inside me likes the EJBs but how can you convince a customer to pay for such "time consuming" & "exprience requiring= money" EJBs??
Kareem N.Elsayed
SCEA part-I, SCWCD, SCJP2
[ September 11, 2003: Message edited by: Kareem Nasser ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic