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.
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