Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

design pattern - mock question

 
suekar meredilko
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A company is building a J2EE based application for Order Entry and management of their custom software. Once the order is taken, it is submitted to a relational database. A provisioning system then queries data and makes appropriate calls to various subsystems using JMS on MQ Series. What design pattern is JMS an example of here?


The options are : Observer, Mediator, Adapter, Bridge, Visitor

The answer is Bridge.

Why is it so ? I feel its none of them. Mediator is close because to a certain extent because appropriate calls are de-coupled from the order entry part.

Pls explain ... thanks.
 
Santiago Urrizola
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think the key in the question is "various subsystems" ... so the bridge is the answer
Mediator, are used to decouple the comunication betwen two (or more objects)
Observer, Visitor .. of corse none of them ...
Adapter, Convert an interface not knowed by the client into another interface client expects" ...to relation two class but one of them have an interface not knowen by the first ... when you need to use an existing library with oder interface than you expected ...
Bridge,Decouple an abstraction from its implementation ... the abstracion interact with provisioning system ... implementation .. make various calls to sybsystems in JMS on MQ-Series

I hope that it is of aid for you
 
suekar meredilko
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks santiago!
 
suekar meredilko
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actualy jms is an abstraction and implementation is MQ, Others could be AQ, Sonic, TIBCO and so on.
 
Santiago Urrizola
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes you are right suekar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic