Home > Articles > Certification > Other IT

  • Print
  • + Share This
This chapter is from the book

Review Your Progress

These questions test your understanding of JEE web components and their most appropriate use to solve a given business problem:

  1. You are the architect at a large investment bank. Your main area of responsibility is a new web application designed to replace the aging user interface for the existing clearing house back office system. One of the systems is read from/written to via a JMS Queue in asynchronous fashion and transactions and security management are paramount. Select the most appropriate implementation from the following list:

    1. JSP and JSTL accessing a business logic tier built using EJBs and MDBs.
    2. JSP and JSTL accessing a business logic tier built using MDBs only.
    3. JSF accessing the systems directly.
    4. JSP accessing the systems directly.

    Answer: A. B is not flexible enough, omitting EJBs and allowing only MDBs. C and D couple the presentation tier directly to the backend resource, creating potential security, performance, and maintenance problems. A provides what is needed.

  2. You are the architect at ACME Corporation—the hottest Internet start-up of the moment. The start-up provides a front-end accessible by multiple devices, from smart phones to desktops, and provides innovative social networking features to its members. The key considerations for the system are performance and scalability, and individual messages between members are not considered important (that is, they can be resent). Select the most appropriate implementation for this system from the following list:

    1. JSP + JSTL accessing the messaging layer directly.
    2. JSF accessing EJBs, with access to the messaging layer mediated by a JMS client and MDB.
    3. JSF accessing stateful session beans—one for each connected client.
    4. JSP + JSTL accessing a JPA-based persistence tier.

    Answer: A. All of the other options contain a reasonable chance that there will be an unnecessary overhead associated with the components used—EJBs, JPA, and so on. A is the simplest answer for the business problem described, especially when the priority of performance and scalability is stated in the stem of the question.

  3. You are a subject matter expert on JEE consulting for ACME Corporation. ACME has an existing application built using an earlier version of the JEE platform. Performance and scalability are not an issue, although system is not as maintainable as ACME would like. The application uses JSP pages as part of a Model 2 MVC architecture with Java code in the JSPs and some presentation coded as Servlets. What do you recommend?

    1. A complete rewrite of the existing presentation architecture to leverage JSF and JPA.
    2. A deeper analysis of the current system to ensure that JEE best practices (especially the MVC model) are respected throughout the code, replacing Java code in JSPs with JSTL and EL as necessary and making Servlets act purely as controllers.
    3. ACME move the system to use Ruby on Rails.
    4. A complete rewrite of the current architecture to leverage JSF, session beans, JMS, and JPA.

    Answer: B. All of the other answers are nonsensical when you realize where ACME is. They have a system that works today, which requires some refactoring to move to MVC, and they simply need a roadmap after this work is completed to guide them onto JEE 6, 7, and beyond. No rewrites are necessary.

  4. You are a JEE architect at ABC Bank and have been tasked with designing their next-generation UI framework for online banking. The online banking application must be accessible by both standard browser clients and mobile devices. What do you recommend as the simplest and most optimal solution?

    1. A JSF-based architecture, leveraging the capability of device or channel-specific JSF renderers to support both mobile and standard browser clients.
    2. A JSP-only architecture, with custom logic to probe and handle individual devices at runtime.
    3. A Servlet-based architecture.
    4. A template-based architecture.

    Answer: A. JSF is designed to support exactly this type of use case—the other available options, while workable, are not the most optimal or most simple.

  5. XYZ Corp has retained you as the architect for their latest web application: XYZOnline. This application allows customers to search, browse, and order catalog content online. XYZOnline accesses the inventory and payment systems as web services. What architecture do you recommend?

    1. JSP/JSF pages accessing the web services layer using stateless session beans.
    2. Servlets accessing the web services directly using JAX-WS as necessary.
    3. JSP/JSF pages accessing the web services layer using JAX-WS as necessary.
    4. JSP/JSF pages accessing the web services using JMS.

    Answer: C. A uses stateless session beans when nothing in the description warrants their usage. B uses Servlets to generate the presentation, while D uses JMS in the wrong context. C is the best solution for the stated business requirements.

  6. You have been asked to evaluate multiple web presentation technologies for ABC Corp. Their priorities are future-proofing, tooling support from IDEs and the ability to render multiple versions of the same component for different devices. What do you recommend to ABC?

    1. Use JSF components as part of a Servlet.
    2. Use JSTL and the EL as part of JSP pages.
    3. Use JSF components as part of JSP pages.
    4. Use JSTL and the EL as part of Servlets.

    Answer: C. The key to choosing C is to realize that the question guides you there by mentioning tooling support and future proofness. B is close but does not match the requirements exactly. D and A are not valid answers.

  • + Share This
  • 🔖 Save To Your Account