aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Design Patterns - Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Design Patterns - Doubt" Watch "Design Patterns - Doubt" New topic
Author

Design Patterns - Doubt

Manikandan Jayaraman
Ranch Hand

Joined: Sep 15, 2004
Posts: 230
Your web application uses a session bean component in a distributed application to make a specialized calculation such as validating credit card numbers. However, you want to shield your web component from the code involved with looking up session bean component and using its interface.

You want to decouple the local application classes from the looking up and use a distributed component whose interface could change. Which J2ee pattern is appropriate?

A. Transfer Object
B. Service Locator
C. MVC
D. Business Delegate

Answer in HFSJ states only "D". Why cannot it also be B? I mean should BOTH B and D be the answers?


Regards,<br />Mani<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (94%)
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
First of all there are only two options which matched those are
B and D
Now we have to decide which of these two are most appropriate.
Now B alone is not possible.
It can be D or D and B
Now question is asking for
decouple the local application classes from the looking up and use a distributed component whose interface could change
So answer is D
Actually Service Locator is helper for Business Delegate and question donot specify choose all that apply.
Vikrant Pandit
Ranch Hand

Joined: Mar 27, 2006
Posts: 245
i personally hate such questions where you have to choose "more correct" of the "two correct" answers


Vikrant Pandit
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
shield your web component

the moment you see the word SHIELD, select the business delegate !

the WCD pattterns review section in head forst has lots of such HIT WORDS,
which if you remember you have fair chnces of anwering any question on design patterns !

hth


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
Hi Niranjan, I don't have the Head First book. Could you post some HIT WORDS of design patterns at here, thanks a lot.


SCJA, SCJP5.0, SCBCD, SCWCD
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
you dont have the head first book ???

damn it ! you dont have the KEY TO SUCCESS !
 
 
subject: Design Patterns - Doubt