This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
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 J2eepattern 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?
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.