Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Fast reading with Entity Bean CMP strategy?  RSS feed

 
Jes Sie
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Currently, our implmentation just call the Session Bean --> CMP EntityBean for both fast read and normal write/update transaction. For read only transactions, is there room for improvement from a performance perspective?
How do we do DAO (Fast Lane Reader) when the entity beans are using CMP?
Alternatively, is it OK to simply write straight JDBC calls (like DAO ) from the Session Bean? This looks like a persistence strategy that's inconsistent thoughout the whole project (not a big concern )
Any direction would be great, thanks.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume that you are using Session Facades on top of your Entity Beans. For those fast read situations just have the Facade delegate to a DAO class instead of the Entity Bean(s). Writing JDBC code directly in the Session Beans is going make things messy and harder to maintain later, I definitely suggest going with separate DAO objects.
 
Christian Ebage
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Good idea!!
Ebage
SCJP
SCEA
 
Jes Sie
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fair enough. As what I've suspected.
Have you guys ever heard of Hibernate? Is a O/R Mapping software from open source which has quite a good reputation working with EJB Session Beans.
I might wanna implement that as a more elegant DAO strategy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!