• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About ch 22 question 10 in Charle's book

 
Himai Minh
Ranch Hand
Posts: 1360
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In ch 22 , question 10 in Charles' book:

An airline sells tickets online.It first allows customers to select their airport, input a destination and a departure time; a servlet processes this result, but must access an EJB application in order to create a list of all suitable flights before forwarding to a JSP view, which two patterns combined would be best implemented here?
A. MVC
B. service locator
C. business delegate
D. transfer object

The answer is C and D.
Explanation:
A delegate provides a uniform way to access to EJB data, while a transfer object is used to transfer details about all available flights at the same time. B in incorrect , as although the web application may use a service locator for convenience, the other two patterns (transfer object and business delegate) provide the significant interface with EJB.


I think service locator can be one of the options as well. The business delegate can use service locator to look up the EJB. The business delegate can use the EJB returned from the service locator. Then, the business delegate can use the EJB application.

 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2533
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True, this is a bit tricky and it is because of the word "which two patterns combined would be best implemented here?"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic