Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What to use?

 
James Dekker
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given you are in a situation where a number of complex database interactions that need to be both transactional and also to be called by remote network clients, what is the best solution to use out of the following:

* Stateful Session Bean
* Container Managed Persistence
* Bean Managed Persistence
* Stateless Session Bean
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this an exam question? Some of the choices listed are odd things to suggest for the scenario.
 
James Dekker
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am studying for the SCEA and found this question in a practice exam...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James,
What do you think the answer is? If you aren't sure between two, which two and why?
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess, BMP.

Reasons:
1. Its complex database interaction - CMP might not have queries what is required.
2. BMP quires (writing SQL queries manually) is more efficient than CMP queries - efficiency of query is required because it�s called by remote client.
 
James Dekker
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess(es) are Stateful Session Beans (because the remote network clients are going to have to authenticate and require some sort of state) and also Container Managed Persistence.

BMP, from the best of my knowledge, is an outdated practice because using CMP, with session beans and EJB QL, makes everything a lot simpler. Look at it this way, with EJB QL, there is a lot less code to write.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic