• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Resource for designing persistence layer

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
I am coding a J2EE application using Tomcat-JBoss-MySql combo. I am only going to implement BMP's. I want to design/implement the persistence layer.
I have been looking at the DAO pattern too.
Can you tell me what one should keep in mind while designing the persistence layer? Or is it better to use an OR tool?
Can you refer some resource that gives guidelines for designing the persistence layer?
Thanks in advance.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you must use entity beans (why?) and CMP is out (why?), I'd definitely use an O/R tool. Hibernate or any decent JDO implementation will do nicely. I'd never consider using anything else. I've written plain ol' JDBC BMP; been there, done that, worn the tar and feathers
I'd really query the decision to use entity beans however. Using BMP saddles you with the n+1 finder problem. Did you consider POJO persistence using Hibernate or JDO behind a session facade?
- Peter
 
Yan Lee
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correction to my earlier statement. I am NOT using any entity beans only session beans in the project.
Thanks for pointing it out.
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. This may be more than you're asking for, but explore what the C2 Wiki has to say about OR mapping. There's also an interesting OR tool comparison there. You'll find a wealth of design and pattern discussion in the wiki, with contributions from some illustrious names.
- Peter
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic