• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource for designing persistence layer

 
Yan Lee
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • 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.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • 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
  • 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
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic