• 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

JDO & EJBs

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does JDO make sense in an EJB solution?
And if it does, in what way is it better than using entity beans?
Thanks,
Panagiotis.
 
Author
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, you may want to examine the JDO or CMP? excerpt from our book that summarizes this.
Craig should be able to give you a more complete answer on this. JDO persists plain, ordinary Java objects and allows direct navigation of references in your object model. Entity beans are primarily distributed object components that come with all the plumbing, complexity, and overhead of supporting distributed object communication. JDO is, in general, regarded as much simpler to use and faster. Craig did a CMP container implementation using JDO in the Sun ONE application server, so he will have a lot to say about this topic.
 
Author
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JDO makes sense in an EJB container. Specifically, use JDO to access persistent data from session beans, message-driven beans, and JSP/servlet including Struts, JSF, and other such frameworks.
Basically, JDO offers more modeling features than CMP beans and is a whole lot less work than writing your own BMP beans.

Originally posted by Panagiotis Varlagas:
Does JDO make sense in an EJB solution?
And if it does, in what way is it better than using entity beans?
Thanks,
Panagiotis.

 
Panagiotis Varlagas
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your answers! I'll definitely read the article, hopefully the book too as time permits.
It is now clearer to me. JDO is a persistence framework that handles the "infamous" object-relational mapping issue. It is a (better in your opinion and experience) alternative to CMP and BMP with respect to persistence services.
So, JDO provides an OO abstaction of your underlying DB (typically a relational one, as abstracted - at a lower level - by JDBC). Now the question is why JDO is better than any other of the host of OO-relational mapping solution that (may) exist outthere (Toplink, WebSphere Studio Data Access Beans, etc.)...
And returning to the EJB issue, session beans and message-driven beans are orthogonal to JDO, since the provide pretty much transactional and messaging services that are outside JDO's scope.
Do the above make sense?
Thanks,
Panagiotis.
 
David Jordan
Author
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JDO is a Java standard now, having gone through the Java Community Process. JDO is an API supported by 15 different vendors. The other products you mention are all proprietary, non-standard products supported by a single company.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Panagiotis Varlagas:
Now the question is why JDO is better than any other of the host of OO-relational mapping solution that (may) exist outthere (Toplink, WebSphere Studio Data Access Beans, etc.)...


JDO is better because it's a standard. Toplink might be better when the feature matrices are put side by side but these days the "standard" stamp gives a lot value over some niche features found only in top notch proprietary products.

Originally posted by Panagiotis Varlagas:
And returning to the EJB issue, session beans and message-driven beans are orthogonal to JDO, since the provide pretty much transactional and messaging services that are outside JDO's scope.


SessionBeans/MDBs should be used as they are being used already -- for business logic. The only thing JDO changes is that the business logic calls a different API for making certain information persistent (i.e. JDO instead of CMP/BMP).
 
David Jordan
Author
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct Lasse!
One point to make though. JDO is a standard, TopLink is a product. There are still features and capabilities that are provided in a product that are not found in an interface standard like JDO. So a fairer comparison would be to compare TopLink with one of the leading JDO relational products. TopLink has been around longer than these JDO products, so it is natural for TopLink to have more features. But I believe the feature gap between TopLink and the leading JDO relational products will diminish as the JDO products compete with one another based on these additional capabilities. Still, the application software itself will remain portable across the JDO implementations.
This happens all the time in technology as new standards come out. When relational databases first came out, people were claiming that the Codasyl databases had many more features than the relational databases. But over time, the new technology catches up. Having a common interface standard provides a pluggable architecture that allows vendors to innovate and compete while the users of the technology have stability and portability to migrate to the best of breed technology.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic