• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design Pattern sample question

 
Pinal N Patel
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An application has three Stateless Session Beans - SB1, SB2 and SB3. The stubs that implement the respective Home Interfaces are SH1, SH2 and SH3. A client application performs a JNDI lookup to obtain a reference to one of these Home Objects. This is then narrowed and used to create the remote reference to the corresponding remote object. What design pattern best explains the creation of the Remote Object, in this case?

APrototype
BBuilder
CFactory Method
DBusiness delegate
EService Locator

Choice C is correct


Can someone please clarify on why the answer is C. Your input is greatly appreciated.

Thanks,
Pinal
 
Ray Ye
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In home interface, you will have create() methods, these create() methods return remote interface of ejb objects, and it is the factory pattern they are using (more strictly speaking, it should be the abstract factory pattern)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic