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

ejb questions 2

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.
Scenario
You are implementing an EJB Facade pattern, and you decide to use a message-driven bean instead of a Session Bean for the Facade.
Referring to the scenario above, which one of the following reasons is an advantage of Message Facade versus Session Facade?
Choice 1
It can throw application exceptions back to the client.
Choice 2
It returns immediately and executes the logic later.
Choice 3
It can programmatically check the caller's role and access rights.
Choice 4
It can store the conversational state of the client-server interaction.
Choice 5
It has strongly typed input parameters for the business methods.

2.
What Java type do you use for a Container-Managed Relationship (CMR) field pointing to multiple, non-duplicate items?
Choice 1
java.util.HashMap
Choice 2
java.util.ArrayList
Choice 3
java.util.Vector
Choice 4
java.util.Collection
Choice 5
java.util.Set

3.
For a message-driven bean using bean-managed transactions, which one of the following calls to its associated MessageDrivenContext is allowed?
Choice 1
getEJBHome()
Choice 2
setRollbackOnly()
Choice 3
getUserTransaction()
Choice 4
getCallerPrincipal()
Choice 5
getRollbackOnly()

4.
Scenario
The EJB Container is throwing java.lang.IllegalStateException when an entity bean EJB callback method calls EntityContext.getPrimaryKey().
Which one of the following EJB container callback methods creates the scenario above?
Choice 1
ejbRemove()
Choice 2
ejbActivate()
Choice 3
ejbPostCreate()
Choice 4
ejbCreate()
Choice 5
ejbStore()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic