admin 管理员组

文章数量: 1184232


2024年1月17日发(作者:awk统计出现次数)

KillFail

质量高

质量高 服务好

服务好

Exam:

1Z0-864

Java Enterprise Edition 5 Enterprise Architect Certified

Master Exam (Step 1 of 3)

8.02

Title:

Version:

更新到考完并且通过为止

Q1. What are the three primary roles in a web service interaction? (Choose three.)

A. Broker

B. Facade

C. Provider

D. Decorator

E. Requestor

F. Interceptor

Answer: A,C,E

Q2. A stock trading company is writing a new application for stock market forecasting. A significant

portion of the work required by the business logic involves navigating through the persistent

object model. As lead architect on this project, you have chosen JPA over EJB2 entity beans to

implement these persistent objects. You have done this to maximize performance when

navigating through the model. Why does JPA offer better performance for this task?

A. JPA guarantees referential integrity at the object level.

B. JPA allows the application to specify lazy or eager retrievals.

C. JPA simplifies the source code that implements the object model.

D. The guaranteed referential integrity in EJB2 entity beans is expensive.

Answer: B

Q3. A developer creates a Java web service to be used by consumers in an SOA. This SOA uses a

UDDI service registry. How can the developer make the new service available to consumers?

A. Deploy to the registry using JAXR

B. Publish to the registry using JAXR

C. Query the registry using JAX-RPC

D. Target the registry using JAX-RPC

Answer: B

Q4. With the release of a new product line, there has been a significant increase in the volume of transactions on your web

site. You need to scale your application and manage session failover.

What is the best option for scalability?

A. Add additional web servers and application servers

B. Introduce a High Availability pair and utilize sticky sessions

C. Add additional application servers and implement DNS round robin

D. Add additional application servers and use clustered HttpSession

Answer: D

Q5. You are asked to architect an SOA solution that leverages Java web services. The architecture needs to be flexible and

allow for the SOAP 1.1, SOAP 1.2, and REST implementations. Which Java EE technology should you use?

A. JAXP

B. JAXB

C. JAX-WS

D. JAX-RPC

Answer: C

Q6. You are architecting an online ordering application with these requirements: Users access the system over the Internet

using HTML.

An email message is sent to the user confirming the order. Users must log in and are validated using LDAP.

The product catalog is stored in a relational database.

All orders are logged to the internal fulfillment system.

Orders must not be lost.

Which Java EE technology should be used to send orders to the fulfillment system?

A. JNDI

B. JMS

C. JAX-WS

D. RMI-IIOP

Answer: B

Q7. An online sporting goods store's web application uses HTTPSession to store shopping carts.

When the application is initially deployed, the business plan predicts only a few customers will

access the site. Over time, the store projects a steady increase in volume. The deployment plan

calls for a single web container in the initial deployment. As demand increases, the plan calls for

multiple web containers on separate hardware with clustered HTTPSession objects. Which two

principles will help the application meet the requirements and optimize performance? (Choose

two.)

A. The application should store as much as possible in HTTPSession objects.

B. The application should NOT make frequent updates to HTTPSession objects.

C. The application should make coarse-grained updates to HTTPSession objects.

D. The application should create new HTTPSession objects instead of updating existing objects.

Answer: B,C

Q8. You are writing a utility that searches for existing web services provided by large companies through UDDI. Your web

site allows the user to input search criteria using event-driven, state managed GUI screens, performs the search, and

displays them in a formatted HTML page. Which technologies would you use for this application?

A. JSP and JAXB

B. JSF and JAXR

C. JSF and JAX-WS

D. JSP and JAX-WS

Answer: B

Q9. A company has a web service that provides the most recent price for stocks, mutual funds, and

commodities. The company has the only web service that allows a person to check prices on all

three financial assets with one call. Its system does not store this information but sends individual calls to each of the primary

vendors for an asset and then aggregates the response to the

requester. The company has committed to support a non-functional requirement (NFR) for

performance that states it must process all requests within three seconds and each of the three vendors is obligated to

support the NFR as dictated by the company. Where, in the message

flow, is it appropriate to measure whether all the NFRs are met?

A. when a request is received and a response is sent to the requester

B. when a request is received, first call to vendor, last response from vendors, response is sent to a requester

C. when a requester sends a request, the request is received, each call to vendor, each response from vendor, requester

receives response

D. when a request is received, each call to vendor, each response from a vendor, a response is sent to a requester

Answer: D

Q10. A Java web component, EJB component, or another web service can be a client to a web service. Which Java API can

the client use to access the web service through a Service Endpoint

Interface?

A. JAXB

B. JAXR

C. JDBC

D. JAX-WS

Answer: D

Q11. Which three are parts of a SOAP message? (Choose three.)

A. SOAP body

B. SOAP endpoint

C. SOAP headers

D. SOAP handlers

E. SOAP attachments

Answer: A,C,E

Q12. You are integrating with a single legacy Enterprise Information System. You are interested in the transaction

management capabilities of the Java Connector Architecture. This new system needs the capability to invoke multiple

operations against this single legacy system. These operations succeed together or fail together as a group. To which

minimum level of transaction management are you going to set your resource adapter?

A. No transaction

B. Local transaction

C. Distributed transaction

D. Container Managed transaction

Answer: B

Q13. What is an advantage of XML over HTTP, as compared to SOAP over HTTP, for web services?

A. Guaranteed delivery

B. More security options

C. Smaller message size

D. Strongly typed parameters

Answer: C

Q14. An application needs to invoke a service on a remote system over a low latency connection, and then wait for a

response. Which two are best for this type of invocation? (Choose two.)

A. JMS topic

B. JMS queue

C. RMI over IIOP

D. synchronous web service

E. asynchronous web service

Answer: C,D

Q15.

Your new architecture needs to access the business logic of an Enterprise Information Solution (EIS). What are three

benefits of using the Java Connector Architecture to connect to EIS instead of implementing a proprietary solution? (Choose

three.)

A. Security

B. Performance

C. Loose coupling

D. Connection pooling

E. Common Client Interface

Answer: A,D,E

Q16. Your web application requires access to several different services, so you created a Service Locator class to be used

by the UI developers on the team. New services with different interfaces are occasionally added. Unfortunately, the caching

benefits of the Service Locator class are NOT

being realized because a new instance of this class is being created in every backing bean

method that requires a service. Which pattern should you apply to eliminate this problem?

A. Bridge

B. Singleton

C. Prototype

D. Factory Method

E. Business Delegate

Answer: B

Q17. What are two benefits of using the Value List Handler pattern? (Choose two.)

A. Improves network performance

B. Facilitates exposing existing services

C. Provides an alternative to potentially inefficient EJB finders

D. Facilitates post-processing across heterogeneous requests

E. Provides a mechanism to support shared elements of composite views

Answer: A,C

Q18.

What are two capabilities of the Abstract Factory pattern? (Choose two.)

A. Creates whole-part hierarchies

B. Creates families of related objects

C. Enforces dependencies between concrete classes

D. Specifies the types of objects to create using a sample instance

E. Separates the construction of a complex object from its representation

Answer: B,C

Q19. A teenage fashion web site, includes a set of pages for displaying and browsing their catalog, as well as pages for

making fashion suggestions that also display tables of catalog entries.

Currently, the JSP code uses scriptlets that perform database SELECT statements and format the results in HTML tables.

You have been hired to help reduce the maintenance overhead when either the look is modified or the database schema

changes. Which two patterns, used together, do you apply to reduce this maintenance overhead? (Choose two.)

A. View Helper

B. Front Controller

C. Composite View

D. Data Access Object

Answer: A,D

Q20. A new security feature has been requested for an existing web application with the following requirements:

All requests must be logged to a secure database.

Each request must be time-stamped with the start and completion times.

Each request must contain the IP address of the client that made the request. Which pattern is most applicable for this new

feature?

A. Strategy

B. Front Controller

C. Abstract Factory

D. Intercepting Filter

E. Model View Controller

Answer: D

Q21. Which two are benefits of using the Intercepting Filter pattern? (Choose two.)

A. Allows the recombination of filters

B. Provides efficient data sharing between filters

C. Facilitates creating a generic command interface

D. Facilitates common processing across heterogeneous requests

E. Helps to minimize coupling between the presentation and business tiers

Answer: A,D

Q22. You are building a subsystem that has several complex components, but you want to hide that complexity from the

client code. Which pattern can you apply to hide this complexity?

A. Proxy

B. Bridge

C. Adaptor

D. Facade

E. Decorator

Answer: D

Q23. Some media players use a virtual proxy for image loading. What is the benefit of using a virtual proxy?

A. It controls access to the original object.

B. It defers creation of expensive objects until necessary.

C. It provides a local representation for an object in a different address space.

D. It is a replacement for a bare pointer that performs additional actions when an object is accessed.

Answer: B

Q24. Your company's web site is supported with a cluster of load-balanced web servers and a database

server. To reduce expenses, your company must replace your current cluster of web servers with a single web server. All

servers under consideration have the same specification. Which three items will be negatively impacted by this

re-architecture? (Choose three.)

A. Security

B. Reliability

C. Scalability

D. Availability

E. Manageability

F. Maintainability

Answer: B,C,D

Q25. A company manufactures widgets for sale to distributors. Distributors call this company when

they want to order more widgets. The company wants the distributors to send orders using XML documents over the Internet

to reduce the number of data entry personnel needed. It has no

control over the distributor's technologies. The company does not want the orders to impact the performance of the other

users. You have been assigned the task of designing the new API.

Which approach do you take?

A. design the API as a JMS queue

B. design the API as an RMI interface

C. design the API as a synchronous web service

D. design the API as an asynchronous web service

Answer: D

Q26. You have been tasked with improving the availability of an existing three-tier application. What is

your first step in evaluating what changes should be made to the architecture to achieve the

goal?

A. Monitor network traffic between tiers

B. Separate presentation from business logic

C. Identify and document all single points of failure

D. Cluster the presentation tier without session replication

Answer: C

Q27. Which non-functional requirement is a disadvantage for a two-tier architecture?

A. Security

B. Reliability

C. Availability

D. Manageability

Answer: D

Q28. A travel company is designing an application to allow customers to browse for information on any flights operating

domestically and to place new reservations on any of those flights. The company makes the following assumptions:

significant read volume, in terms of operations the customers will perform significant overlap, in the search criteria of

customers simple processing of each

customer browse/update request What advice can you give this company?

A. use a two-tier architecture (rich client directly accessing the database) because running copies of the business logic in

each client provides significant advantages in terms of processing time per request

B. use a three-tier architecture (thin client -> application server -> database) because executing business logic remotely on

a central location results in better performance per request

C. use a three-tier architecture (thin client -> application server -> database) because the shared business server allows

them to cache information with high likelihood of cache hits, which reduces the load on the database

D. use a two-tier architecture (rich client directly accessing the database) because each client can operate on its own

business objects, independently of others, which provides significant advantages from reduced latency due to

synchronization

Answer: C

Q29. A company provides call center support for corporations world-wide. Each agent in the call center

can be assigned to multiple call center customers. All of the company's customers use Windows-

based user interfaces and it has just signed a new customer that uses a Java EE backend and

wants a rich interface. The company is developing a user interface for the new customer with the

following requirements: Customer service representatives (CSRs) must be able to work with

minimal training on the application. CSRs must be able to switch between call center systems

quickly. Screens must have a Windows "look and feel." 2000 agents spread across four locations

must be able to use the system. What advice would you give this company on the user interface

(UI)?

A. Write the UI using JSP and JSTL

B. Write the UI using JSPs with embedded scriptlets

C. Write the UI using Ajax, accessing servlets directly

D. Write the UI using Java Swing and distribute using JNLP

Answer: D

Q30. A travel company decides to re-architect their two-tier application (where each client ran its own copy of the application

against a shared database) and hires you as their lead architect. You suggest they re-architect their application as a

browser-based, three-tier solution: presentation, business logic, and persistence. You also suggest they deploy each of the

three tiers on its own computer. Why is the three-tier solution more scalable than the two-tier solution?

A. Every client runs its own GUI application. Clients do not compete for resources for presentation purposes.

B. Clients share the same business logic tier. Client-specific objects can be stored centrally, optimizing access.

C. Every client shares the same business logic tier. Each client competes with each other for resources on that JVM.

D. Clients share the same business logic tier. Duplicate effort can be avoided by sharing objects, reducing the load on the

database.

Answer: D

Q31. Which two can be used to maintain conversational state? (Choose two.)

A. Entity beans

B. HTTP session

C. stateful session beans

D. Message-driven beans

E. Stateless session beans

Answer: B,C

Q32. You are the architect of a project that will provide an external, low latency, scalable, and highly

available service for handling string translations. Each request consists of a short string ID and a

language key, limited to "EN", "FR", "ES", "DE" and "JP". Each response is a simple unicode

string averaging 256 bytes in size, and there will be no more than 50,000 records for each

language. All the records have already been translated and changes to the records will be rare.

What should you do to ensure that your service will scale and perform well as new clients are

added?

A. Store all the records in an LDAP server and use JNDI to access them from the web tier

B. Deploy a standard 3-tier solution that is supported by a fast and reliable relational database

C. Deploy a single service on many servers in the web tier, each storing all the records in memory

D. Store all of the records in a network attached file system so they can be served directly from the file system

Answer: C

Explanation:

Q33. You are the architect of a web application that uses JSF as a presentation tier for business processes coded as

stateless session beans. When you add new code to the stateless session beans to address new accounting requirements,

without changing the interface, you discover that the new business processes are being ignored by some of the JSF

components. Which might be the cause of this problem?

A. The presentation tier is relying on validation logic in the business tier.

B. The browser is caching out-of-date versions of the JSF components.

C. The business processes are not rigorously encapsulated in the session beans.

D. The new session beans have been deployed incorrectly, and proper deployment will resolve the problem.

Answer: C

Q34.

You have refactored your legacy Java application into a three-tiered architecture. Your Security

Audit group is concerned that your architecture may be vulnerable to security threats in the

separate tiers. Which two methods can you use to reduce those threats? (Choose two.)

A. Programmatic security in the EJB Entities

B. Intercepting Filters between the view and the controller

C. Intercepting Filters between the controller and the model

D. Role-based security for the EJBs in the deployment descriptor

Answer: B,D

Q35. DRAG DROP

Click the Task button.

Answer:

Q36. The current architecture of a fashion web site consists of one web server, three application servers, and a database.

You, as the lead architect, recommend adding more web servers. What are two valid justifications for the new architecture?

(Choose two.)

A. New web servers will decrease latency for I/O-bound requests.

B. Adding multiple web servers will have a positive impact on scalability.

C. Adding new web servers will increase the overall availability of the web site.

D. New web servers will increase the number of user accounts that can be supported.

Answer: B,C

Q37. Which three statements are true about delegation as an OO design technique? (Choose three.)

A. It is applied to a system only at compile time.

B. It is an essential element of the State pattern.

C. It is an essential element of the Singleton pattern.

D. It allows you to replace inheritance with composition.

E. In Java technology, it is always implemented through the use of generics.

F. It always requires that at least two objects are involved in handling a request.

Answer: B,D,F

Q38. Which two statements are true about the Flyweight pattern? (Choose two.)

A. It allows a single instance of a class to virtually represent many instances.

B. When used appropriately it can reduce memory demands on your servers.

C. It allows for many instances of a class to be controlled by a single instance.

D. It allows many tightly related, homogeneous objects to each maintain their own state.

Answer: A,B

Q39. Which two techniques can be used to provide polymorphic behavior? (Choose two.)

A. Extending a class and adding a new method

B. Implementing two interfaces in the same class

C. Extending a class and overriding an existing method

D. Implementing an interface with several different classes

Answer: C,D

Q40. As a project architect, you are selecting technologies for a complex, n-tier web application's virtual platform. At this

stage in the project, which two technologies should be of primary consideration? (Choose two.)

A. RMI

B. Linux

C. JDBC

D. Firefox

E. Tomcat

Answer: A,C

Q41. A company offers a financial workbench tool that lets users search for a variety of financial products using an

open-ended, variable set of query criteria. The resulting queries can have widely different structures and use a number of

aggregate functions. The actual querying is

performed on the server, so as to take advantage of sophisticated caching technology developed by the company. The

company values ease of development and does not want to see resources taken away from the company's main specialty,

which is financial analysis. Which persistence technology best supports this company's requirements?

A. JPA

B. JDBC using prepared statements

C. CMP entity bean with DAO pattern

D. BMP entity bean with JDBC layer and DAO pattern

Answer: A

Q42. Your company is considering migrating a persistence module implemented using CMP entity beans to JPA. Which two

statements are true? (Choose two.)

A. Each CMP entity bean can be mapped to a single JPA entity class.

B. The client code that accesses the CMP entity beans does not have to change.

C. JPA cannot capture all the kinds of relationships supported by CMP entity beans.

D. The resulting JPA persistence module can be used on both the client and the server.

E. The JNDI name of a JPA entity class can be customized to match that of the corresponding CMP entity bean.

F. Remote clients of the CMP entity beans must start using web services to access the JPA entity classes on the server.

Answer: A,D

Explanation:

Q43. Which three statements are true about the server programming model for web services in Java EE? (Choose three.)

A. Stateful session beans can be exposed as web services in the Java EE platform.

B. Stateless session beans can be exposed as web services in the Java EE platform.

C. EJBs that are exposed as web services are considered as normal EJBs by the EJB container.

D. The Service Endpoint Interface (SEI) must follow the JAX-RPC or JAX-WS rules for WSDL to-Java mapping.

E. EJBs that are exposed as web services are executed in a restricted sandbox by the EJB container when compared to an

EJB not exposed as a web service.

Answer: B,C,D

Q44. A stock company has operations in all major exchanges worldwide. Stockbrokers spend 80 percent of their trading

time logged into and using the company's main application - BuyLowSellHigh. It is redesigning BuyLowSellHigh to use the

Java EE platform. Key requirements are to minimize the size of messages sent between application tiers, and provide a

consistent state mechanism for both Java Swing and HTML-based application clients. Server-side resources are dedicated

to users for the lifetime of their session and the company charges a premium to its traders to ensure that resources do not

need to be pooled or reused. Given these requirements, what is the best approach to maintaining state in the business logic

tier?

A. The HttpSession object accessed from the HttpServletRequest object

B. A handcrafted singleton class accessed by the presentation tier using RMI-IIOP

C. An entity bean acquiring and releasing resources as needed to service requests

D. A stateful session bean created and associated with the client on login until logout, acquiring and holding all server-side

resources needed

Answer: D

Q45. Your company is creating a Java EE corporate-wide workflow system in which significant internal business events are

consumed by multiple applications. Due to multi-year development and

deployment plans, many of these applications do not exist yet, even at the design stage. IT has defined standard data

formats for these events in the form of small XML documents. Also, the rules for how an application filters and processes

events are not fixed in advance and can change over the life of the application. Which combination of technologies is best at

distributing and

consuming these events throughout the company?

A. Relational database and JDBC

B. HTTP client library and servlets

C. RMI and stateless session beans

D. JMS topics and message-driven beans

E. JMS queues and message-driven beans

Answer: D

Q46. Interceptors provide a way of refactoring code shared by multiple EJB 3 components into a single

unit. This is particularly appealing when the code in question can be described as implementing a specific aspect, for

example, having a well-defined purpose that can be described in a concise way. Which two actions can be implemented as

interceptors? (Choose two.)

A. Logging the IP addresses of all clients of a web application

B. Computing sales tax based on customer ZIP code for a variety of purchase operations

C. Publishing to a JMS topic the arguments to any successful method invocation on an EJB component

D. Computing a discount percentage based on a customer's profile and the contents of the customer's shopping cart

E. Logging the identity of any authenticated clients to any of the business methods defined by a set of EJB components

F. Ensuring that the clients of a web service implemented as a stateless session bean are authorized to access its

operations, based on a WS-Security SOAP message header

Answer: C,E

Q47. Your company has supported agile practices and as a policy, all their developers use test-driven development. Tests

are run early and often, starting with the individual developers up to nightly tests and regularly scheduled durability tests. To

make developers more productive in such an environment, management wants unit tests to run as much as possible outside

the container,

without requiring the application to be deployed to an actual server. This would reduce the time spent waiting for test results.

Which components are most thoroughly testable outside a container without requiring the creation of mock objects?

A. CMP entity bean

B. BMP entity bean using JDBC for persistence

C. Stateless session bean using JPA for persistence

D. Stateless session bean exposing a web service interface

Answer: C

Q48. Your company has defined a set of business operations that it makes accessible to client applications. These

operations, which are modeled as methods on a stateless session bean component, act as building blocks for complex state

changing activities that need to possess atomicity, consistency, isolation, and durability (ACID) semantics. Which remoting

technology is most appropriate out of the box?

A. RMI

B. JMS

C. Web services

D. XML over HTTP

Answer: A

Q49. Which programmatic activity is NOT appropriate for an MVC-based enterprise web application

JSP?

A. Iterating over a collection

B. Embedding JavaScript code

C. Setting state on the user's session

D. Getting state from the user's session

E. Conditional logic to show view elements based on state

Answer: C

Q50. A company that makes avatar skins for virtual reality environments wants to deliver the textures that its customers

purchase on the company's web site to its customer's avatar profile in-world. The target virtual reality environment can be

communicated with from the outside-world using a web service. However, the web service invocation will fail if the customer

is not online. Which architecture would be most appropriate to use in this situation?

A. Stateless session beans to attempt delivery

B. Invoke the web service from a JSF managed bean

C. A JCA resource adapter to invoke the web service

D. The EJB timer service to attempt delivery at regular intervals

Answer: D

Q51. You must build a network management web application that interacts with a complex data model

on the server. This data model uses strings, integers, and value objects that represent network IP

addresses (represented to the user in the form "10.10.201.42") and port lists (represented in the

form "80, 443"). The web forms and interaction with the backing beans is simple. Also, the web

designer has extended the HTML tag appears in many forms. What is the

simplest architecture to support this web application and reduce redundant HTML code?

A. JavaServer Faces only

B. JavaServer Pages only

C. JavaServer Pages with standard tags

D. JavaServer Faces with custom components

Answer: D

Q52. DRAG DROP

Answer:

Q53. A small company that sells avatar skins for virtual reality environments, has a static web site for advertising their wares.

The web site was created by a talented graphic artist using a popular WYSIWYG (What You See Is What You Get) HTML

editor and contains a great deal of

JavaScript. The company wants to add server-side processing capabilities for the purpose of developing a shopping

application. They are considering using JavaServer Faces (JSF). What is a potential disadvantage the JSF framework?

A. The JavaScript will have to be rewritten to conform to JSF standards.

B. JSF tags cannot be integrated into the HTML generated by WYSIWYG editors.

C. The graphic artist cannot accurately preview the web pages offline with a generic WYSIWYG HTML editor.

D. All the web pages will need to be converted into JSF before going into production, to keep the end users from losing a

session context.

Answer: C

Q54. Which application would NOT be a good candidate for an EJB-centric implementation of the business tier?

A. An application that transfers money between accounts

B. A news-oriented web site that receives millions of hits a day

C. An application with business logic that calls third-party web services

D. A small workflow-oriented application to provision and deprovision employee accounts

Answer: B

Q55. You were hired by a company with a teenage fashion web site, to create a portal for their sales

staff that is accessible over the Internet. As part of this web portal your application needs to

generate a sales bar chart dynamically from real-time corporate data at request-time and streamed to the web browser.

Which technology is best suited for creating these PNG-based bar graphs?

A. JSP page

B. filter class

C. servlet class

D. JSP custom tag

E. JSF standard component

Answer: C

Q56. A design company that makes avatar skins for virtual reality environments wants to create an online catalog system

that enables customers to purchase skin textures. The company is concerned about being ranked well by search engines

and therefore wants their entire catalog to be easily parsed by the search engine bots. Which view generation strategy is the

most problematic for this endeavor?

A. using servlets

B. using JSF tags

C. using JSP tags

D. using PHP tags

Answer: B

Q57. Which two actions limit the negative consequences of a successful attack? (Choose two.)

A. Implementing the principle of least privilege

B. Installing a firewall at the outer boundary of your systems

C. Placing Internet-accessible servers in a demilitarized zone

D. Using a single sign-on system so that administrators do not have to log in to each server separately

E. Giving servers administrative rights to the databases they need, and ensure that the password is not hard-coded

Answer: A,C

Q58. Your company's new Internet application has complex requirements for the restriction of web page access, and you

know the site's current security requirements are subject to change. You have recommended to your Chief Technology

Officer that the Java Authentication and

Authorization Service (JAAS) should be used for security. Which three security features

influenced your decision? (Choose three.)

A. Single sign-on support

B. A framework for SOA governance

C. Pluggable Authentication Modules

D. Secure Internet connections using sockets

E. A framework for encryption, key generation, and key agreement

F. A flexible access control policy for user-based, group-based, and role-based authorization

Answer: A,C,F

Q59. The requirements state that a new system must use encryption to prevent data theft. Passwords must be stored using

a one-way encryption algorithm so that they can never be accidentally

displayed. Social security numbers must be stored in the database using a symmetrical algorithm so that they can be output

on reports when necessary. Which three encryption methods can you use? (Choose three.)

A. Passwords can be stored using MD5.

B. Passwords can be stored using RC4.

C. Passwords can be stored using 3DES.

D. Social security numbers can be stored using SHA.

E. Social security numbers can be stored using 3DES.

F. Social security numbers can be stored using Blowfish.

Answer: A,E,F

Q60. A company has just released a new GUI interface for their product. As part of the interface, a navigation tree is

displayed to the users using an unsigned applet that is loaded using the Internet. Which two actions can the applet take?

(Choose two.)

A. Create new threads in the JVM

B. Start other programs on the client

C. Use excessive amounts of CPU time

D. Access load libraries on the local machine

E. Access file directories on the local machine

F. Make network connections to another web server

Answer: A,C

Q61. Which two checks are made possible in the byte-code verification? (Choose two.)

A. CPU usage is controlled.

B. Access to files is checked.

C. Digital signatures are verified.

D. Data type conversions are checked/controlled.

E. The language access restrictions (for example private, protected) are respected.

Answer: D,E

Q62. You are architecting a new Internet-deployed application and you want to restrict access to parts

of the system for security purposes. Which three security restrictions can be specified in the

deployment descriptor according to the servlet API specification standards? (Choose three.)

A. On page forwarding

B. On encryption methods

C. Based on the role name

D. Based on the user name

E. Based on the URL pattern

F. Based on the HTTP method

Answer: C,E,F

Q63. You are concerned about the threat of arbitrary code execution on your server. Which action should you take to

address this?

A. Install a firewall and create a demilitarized zone

B. Move the vulnerable server onto a VLAN segment

C. Enable "data execution prevention" in the host OS

D. Require digital signatures on all communications to and from the server

Answer: C

Q64. You have a web portal system that interfaces to a web service endpoint on an unsecured communication channel. Evil

Hacker X is intercepting the message between the two endpoints.

What kind of security threat is this?

A. Session theft

B. Man in the Middle

C. Cross-site scripting

D. Broken authentication

E. Distributed Denial of Service

Answer: B

Q65. What are two significant advantages of developing web applications with JavaServer Faces? (Choose two.)

A. JSF pages can be previewed outside the web container.

B. Backing beans can be unit tested outside the web container.

C. Client-side validation mechanisms are automatically generated.

D. The event driven model for invoking backing beans is friendly to JavaScript callbacks (Ajax).

Answer: B,D

Q66.

Which three application concerns do most web application frameworks attempt to separate? (Choose three.)

A. Data

B. View

C. Logic

D. Logging

E. Filtering

F. Data validation

Answer: A,B,C

Q67. A company is extending its successful social networking site to support the following channels: IM (instant messaging),

email messaging, and text messaging/SMS. At present, the site has scaled 400 percent in one year using a standard MVC

web framework. The application experiences

large surges or spikes in demand and also periods of inactivity. Notification delivery to the three channels does not need to

be guaranteed. Which solution extends the current architecture and best meets the company's requirements?

A. Send the notifications inline, that is, within the normal HTTP request-response cycle

B. Place messages on a JMS queue and use MDBs to create and send the notifications

C. Insert the messages into a database and use POJOs to read the messages using JDBC and send the notifications

D. Insert the messages into a database and use entity beans to read the messages using JDBC and send the notifications

Answer: B

Q68. A company has been using servlet and JSP technology for over seven years. The company's IT department is

considering migrating to JSF technology. Which two drawbacks must the IT

department consider during this migration? (Choose two.)

A. JSF provides only a static set of built-in components.

B. JSF reduces scalability because it synchronizes the creation of the form's component tree.

C. JSF reduces scalability because it must store the view's component tree between requests.

D. JSF reduces scalability because of the additional computational overhead of the JSF life cycle.

E. JSF provides no built-in components forcing the development team to build everything from

scratch.

Answer: C,D

Q69. A fashion web site has many small chunks of content that web designers cut-and-paste in many pages. Over time,

inconsistencies have emerged as one designer alters the HTML of a given chunk. As an architect, one of your tasks is to

introduce a mechanism to be used by the web designers to isolate these chunks and keep them consistent. Which two

technologies allow web designers to isolate and reuse these chunks of HTML? (Choose two.)

A. Tag files

B. Simple tag handlers

C. Classic tag handlers

D. JSP include directive

E. JSP forward directive

F. JSP Expression Language

Answer: A,D

Q70. A hospital has a patient management system. Currently it is used by nurses who access the system using tablet

computers with a browser-based interface. The application uses HttpSession objects to store state information. In phase two

of the implementation, nurses will also have access through PDAs. These PDAs will use a rich client and access the

business logic using a web service. What are two ways to manage conversational state in the new version of the system?

(Choose two.)

A. All clients use HttpSession objects.

B. All clients use stateful session beans.

C. All clients use stateless session beans.

D. Web clients use HttpSession objects and rich clients build a session management framework.

Answer: B,D

Explanation:

Q71. A company has an existing system that is a two-tier (presentation/business logic -> database) architecture that

requires the installation of code on a PC. The company wants the system to support a thin client (browser). Which three

non-functional requirements will be improved as a result of separating the business logic into a third tier (presentation ->

business logic ->

database)? (Choose three.)

A. Security

B. Scalability

C. Extensibility

D. Performance

E. Manageability

F. Maintainability

Answer: C,E,F

Q72. A travel company wants its application to reflect asynchronously any changes that any client might have made to

information common to all clients. For example, if two clients are both viewing the same seat, when it is booked, both clients

see the updated status of the seat as booked. The company is considering whether to implement the presentation using a

Java Swing thick client, or a web-based client using JSP or Ajax. In which option are these technologies shown in order from

best response time to worst response time?

A. Swing thick client > web-based JSP > web-based Ajax

B. web-based JSP > web-based Ajax > Swing thick client

C. web-based JSP > Swing thick client > web-based Ajax

D. Swing thick client > web-based Ajax > web-based JSP

E. web-based Ajax > Swing thick client > web-based JSP

Answer: D

Q73. Given the following architecture: browser clients one web server one database server You are considering modifying

the architecture by replacing the single web server with a cluster of web servers that are capable of load balancing. All

servers being considered have the same

specification. Which two are true? (Choose two.)

A. It would simplify security.

B. It would improve scalability.

C. It would improve availability.

D. It would improve performance.

E. It would improve maintainability.

Answer: B,C

Q74. DRAG DROP

Click the Task button.

Answer:

Q75. A travel company built two prototypes of their application using two different architectures. The

first was a two-tier application (where each client ran its own copy of the application against a

shared database).The second was a three-tier solution: presentation, business logic, and

persistence. For profiling and testing, the second prototype was deployed with each tier in its own server. The three-tier

solution exhibited worse performance than the two-tier solution. Which

statement explains this result?

A. Concurrent update clients must wait for others to complete.

B. The three-tier solution has more resources replicated across clients.

C. The three-tier solution exhibits additional communication traffic between tiers.

D. Concurrent read clients must wait for others to complete, thus slowing performance.

Answer: C

Q76. A teenage fashion website has a multi-tier web application with 103 web servers, 12 middle-tier servers, and a large

RDBMS server with more than enough capacity to support peak loads. You are the architect of the system, and you are

concerned about reliability of the web application.

Which change could you make to improve reliability?

A. Add additional web servers

B. Add additional database servers

C. Add additional middle-tier servers

D. Reduce the number of web servers

E. Reduce the number of middle-tier servers

Answer: B

Q77. What are two aspects of the Strategy pattern? (Choose two.)

A. Provides a way to configure a class with one of many behaviors

B. Defines an object that encapsulates how a set of objects interact

C. Defines the skeleton of an algorithm, deferring some steps to subclasses

D. Decouples an abstraction from its implementation so that the two can vary independently

E. Defines a family of algorithms, encapsulates each one, and makes them interchangeable

F. Allows subclasses to redefine certain steps of an algorithm without changing the algorithm's structure

Answer: A,E

Q78. You have been asked to improve the performance of a company's main stock market application. The application has

been instrumented and the statistics have revealed that the client spends roughly 40 percent of its time waiting for results

from the server. The API between the thick client and the server is fine-grained. Which design pattern should be investigated

and prototyped to improve the network performance?

A. Transfer Object

B. Front Controller

C. Service Locator

D. Service Activator

Answer: A

Q79. You have a large number of stateless session beans, entities, and JMS components in your system. What are three

reasons to use the Service Locator pattern? (Choose three.)

A. To provide a single point of control

B. To improve performance by caching

C. To receive asynchronous client requests and messages

D. To reduce the number of business objects exposed to clients

E. To simplify initial context creation, object lookup, and object recreation

Answer: A,B,E

Explanation:

Q80. You are architecting a web service-based system that wraps existing remote business objects. The object interactions

are complex, fine-grained, and expose proprietary business processes. Which pattern do you use to provide external access

to these business objects?

A. Adapter

B. Session Facade

C. Application Controller

D. Model View Controller

E. Chain of Responsibility

Answer: B

Q81. As the architect charged with refactoring an existing system, you have determined that the interactions between

objects in the existing system are too complex and that the objects are tightly coupled. Furthermore, due to the coupling,

additional functionality would require the modification of many objects in the system. Which pattern can fix this problem?

A. Facade

B. Mediator

C. Template

D. Prototype

E. Command

F. Abstraction

Answer: B

Q82. In which three situations is it best to use messaging with the Service Activator? (Choose three.)

A. when high availability is required

B. when you want to carry data across a tier

C. when interactive client conversations are required

D. when subtasks can be processed in random order

E. when you need to listen for and process messages

F. when you need to publish messages to multiple receivers

Answer: D,E,F

Q83. What are two capabilities of the Decorator pattern? (Choose two.)

A. Provides a unified interface to a subsystem

B. Converts the interface of a class into another interface

C. Is used when the base class is unavailable for subclassing

D. Promotes loose coupling by keeping objects from referring to each other

E. Modifies responsibilities to individual objects dynamically and transparently

Answer: C,E

Q84. You are designing a new subsystem to store and search user comments on a fashion company's

web site. There are a large number of comments and they are indexed in several ways to provide fast access. The class

used to add and search for comments is called CommentManager. In the prototype, the comments are stored in the file

system, but they will be moved to a database as

soon as it is available. Which two statements facilitate modifying the system to use a database? (Choose two.)

A. The storage mechanism must be private to CommentManager.

B. CommentManager should provide a JDBC driver for a file system-based database.

C. The comments stored in CommentManager should only be accessed by CommentManager.

D. CommentManager should be a singleton object and all the accessor methods must be static.

Answer: A,C

Q85. On your first day as the architect at a company, you discover that 217 servlets are making calls to various EJB

components. The system is continually being enhanced and the APIs for the EJB components are changing weekly. The

servlet developers are struggling to keep up with the

changes. Which two statements are true? (Choose two.)

A. This is an example of brittle code dependencies and tight coupling.

B. Introducing a configuration and deployment system will fix the problem.

C. Introducing an abstraction layer between the servlets and the EJB components will reduce the coupling.

D. This problem can be corrected by converting all entity EJB components to stateless session EJB components.

E. Having the servlets communicate with the EJB components using web services will prevent changing servlet code each

time an EJB API changes.

Answer: A,C

Q86. DRAG DROP

Click the Task button.

Answer:

Q87. What describes the design relationship between session beans and entity beans?

A. Aggregation

B. Separation of concerns

C. Common reuse principle

D. Liskov substitution principle

E. Interface segregation principle

Answer: B

Q88. Which two statements describe a design incorporating the use of interfaces and reuse by composition? (Choose two.)

A. This design approach is sometimes referred to as "delegation."

B. This design approach is sometimes referred to as "inheritance."

C. This design approach is sometimes referred to as "white box reuse."

D. This design approach is sometimes referred to as "black box reuse."

E. This design approach is sometimes referred to as "parameterized types."

Answer: A,D

Q89. What are two results of high coupling? (Choose two.)

A. Classes are easy to test.

B. Classes are difficult to reuse.

C. Classes hide their internal state.

D. Classes are easy to understand in isolation.

E. A modification in one class forces changes in other classes.

Answer: B,E

Explanation:

Q90. What are two advantages of using encapsulation in a multi-tier architecture? (Choose two.)

A. Business components inherit behavior from the web container.

B. Complex web container behavior can be hidden behind simple interfaces.

C. Business logic can be modified without modifying objects that depend on it.

D. Database records can be accessed directly from the web tier to improve scalability and

performance.

Answer: B,C

Q91. An application must send information to a remote system using SOAP. According to the application requirements only

the SOAP headers contain sensitive information and need to be encrypted. It is a requirement that the sensitive information

is encrypted during both transmission and storage. What is the best way to implement this messaging system?

A. using WS-Security

B. using XML over HTTPS

C. using SOAP over HTTPS

D. using Container-managed security

Answer: A

Q92. A Java EE application starts a transaction, attempts a database insert using JDBC, and sends a message to an MDB

over a transactional JMS Queue. Upon receipt of a message, the MDB attempts an insert in a different database using

JDBC. What is NOT a possible result after

attempting to commit the application's transaction?

A. The application performs an insert and the MDB performs an insert.

B. The application performs an insert and the MDB does NOT perform an insert.

C. The application does NOT perform an insert and the MDB performs an insert.

D. The application does NOT perform an insert and the MDB does NOT perform an insert.

Answer: C

Q93. A mortgage company is building a system that allows customers to apply for a mortgage using a web application. A

mortgage typically takes several days to process, so the customers receive results through an email message. When a

customer completes the mortgage form, the customer must click the Submit button. When the Submit button is clicked, the

application sends the

mortgage data to an external system for processing and displays a JSP indicating that the

application has been accepted. Because the company's core business is mortgages, the

architecture must guarantee the delivery of mortgage data between the web application and the external processing system.

In this situation, which technology should the web application use to send the mortgage data to the external processing

system?

A. a JMS queue

B. XML over HTTP

C. a synchronous web service

D. an asynchronous web service

Answer: A

Explanation:

Q94. An Enterprise Information System (EIS) needs to inform a Java EE application when an event occurs. How can the

Java EE application use a Java Connector Architecture adapter to receive EIS notifications?

A. using RMI

B. using CORBA

C. using an MDB

D. using a web service

Answer: C

Q95. You are interested in writing an XML messaging application. You would like to make methods calls to an API so you

can read SOAP messages containing attachments and optionally send and receive these messages over the Internet. You

are most interested in implementing XML messaging from the Java platform. Which Java API is best suited for your

solution?

A. StAX

B. SAAJ

C. JAXR

D. JAXP

Answer: B

Q96. Which technology should a Java EE application use to send an XML document and a PDF file to an application written

in C?

A. JMS queue

B. XML over HTTP

C. SOAP web service

D. Java Connector Architecture adapter

Answer: C

Q97. What results directly from failure of input validation?

A. SQL injection

B. forced browsing

C. session hijacking

D. insecure direct object reference

Answer: A

Q98. Which two statements are true about the Java Cryptography Architecture (JCA)? (Choose two.)

A. Any JCA provider must implement each supported category of algorithm.

B. Exactly one implementation of each category of cryptographic algorithm must be provided.

C. Implementations of cryptographic algorithms can be plugged into a JVM after it has been installed and at runtime.

D. Categories of algorithms supported by the JCA include message digests, signatures, encryptions, key management, and

random number generation.

Answer: C,D

Q99. Service method A(), implemented in a session bean, performs a highly sensitive operation. This operation must be

available in limited ways to low-privilege users to support a low-sensitivity operation B(). Which approach addresses the

requirements most securely?

A. Mark the method A() as accessible to all necessary roles

B. Mark the method A() as accessible to all appropriate roles, and use the programmatic security model to impose the

necessary additional restrictions

C. Mark the method A() as accessible to all appropriate roles, and use the deployment descriptor to indicate the conditions

under which each role can invoke the high priority method

D. Mark method A() as accessible only to a special role, then use a run-as element to invoke A()

from B(); before making the call to A(), B() checks that conditions are appropriate for the call

Answer: D

Q100. Using Java Web Start, you are going to deploy a new Java application from the IT development server to all the

computers in your company's network. Which three actions can an unsigned JAR file in the Java Web Start sandbox take?

(Choose three.)

A. Persist session data

B. Access network printers from the system

C. Use the network to access an arbitrary file server

D. Use the JNLP APIs to interact with the local file system

E. Use the network to access the host from which the application was downloaded

Answer: A,D,E

Explanation:

Q101. You need to restrict access to the administration screens in your web site. In which two locations

can you determine whether a user is authorized to access a particular screen? (Choose two.)

A. An EJB entity

B. An intercepting filter

C. A custom tag library

D. Stored procedures

E. A deployment descriptor

F. Custom JavaScript in JSP

Answer: B,E

Q102. The web pages in a system are carefully designed so that links to security-sensitive URLs are not available in pages

offered to untrusted users. Which statement is true?

A. The system security is adequately protected by this approach.

B. Every security-sensitive target must be additionally protected using the declarative security model.

C. The system security is adequately protected by this approach provided only POST requests

are accepted by the server.

D. The system security is adequately protected by this approach, but security must be carefully maintained.

Answer: B

Q103. DRAG DROP

Click the Task button.

Answer:

Q104. A company's backend system is implemented as a set of stateless session bean components.

Traditionally, it was accessed only by a web-based UI, developed in-house. Responding to strong

customer demand, the company now wants to expose a programmatic way to access its system

from other applications. Their customer base uses a variety of operating systems and deployment

environments, with technologies ranging from C/C++ to Perl to Java. The company's customers

place particular importance on the ready availability of tooling to make client development as

painless as possible. Which remoting technology best meets the customer's requirements?

A. RMI

B. JMS

C. web services

D. XML over HTTP

Answer: C

Q105. A company acts as a clearinghouse for credit card transactions. Certain bits of information inside

individual transactions must be kept encrypted at all times to limit the potential for fraudulent

transactions by untrustworthy merchants. Examples of data that must be kept confidential include the full credit card number

and the CVV2 code associated with a card. Additionally, to limit the

risk for tampering with transaction information, the company requires that information about a

transaction travels as one data packet with the associated digital signature. You have been

entrusted with developing the entry point into the system, that is, the component that needs to

accept data for an individual transaction and start processing it. Which technology best satisfies

the company's requirements?

A. Stateless session bean with RMI interface

B. CMP entity bean generated from a database table

C. Message-driven bean attached to a persistent JMS queue

D. Stateless session bean with a RPC-style web service interface

Answer: C

Q106. Over the years your company has developed a large set of EJB 2.1 components. Having upgraded its servers to an

EJB 3 implementation, your company is ready to develop EJB 3 components for the first time in order to use the new

development features. Which two can be implemented without upgrading an existing EJB 2.1 module to version 3, which

would require repackaging and retesting the module? (Choose two.)

A. EJB 2.1 stateless session bean using an EJB 3 interceptor

B. EJB 3 stateless session bean invoking an EJB 2.1 stateless session bean

C. EJB 3 stateless session bean replacing an existing EJB 2.1 stateless session bean

D. EJB 3 stateless session bean sharing a timer with a EJB 2.1 stateless session bean

Answer: B,C

Q107. You have been asked to advise a client on the suitable architecture to use in the construction of

their next generation hotel room reservation system. The primary requirements for the business tier are as follows: ease of

development, separation of the persistence tier from the business logic tier, extensibility, performance, scalability, security,

and transaction management. State is

maintained in the presentation tier. What is the most suitable high-level architecture for the

business tier that most closely meets the stated requirements?

A. stateful session beans accessing the persistence tier directly

B. stateless session beans accessing the persistence tier directly

C. Plain Old Java Objects (POJOs) accessing the persistence tier directly

D. stateful session beans accessing the persistence tier through a DAO layer

E. stateless session beans accessing the persistence tier through a DAO layer

Answer: E

Q108. Which three statements are guaranteed to be true about an ORM-centric approach to data persistence, regardless of

the specific implementation chosen? (Choose three.)

A. ORM implementations can be supported by tool vendors to improve developer productivity.

B. ORM implementations typically trade off a small decrease in raw performance in return for greatly improved developer

productivity.

C. ORM implementations can optimize persistence strategies to scale in both single (one server) and clustered (multiple

servers) scenarios.

D. ORM implementations provide the same level of data access and manipulation semantics, as provided by accessing the

underlying datastore directly.

E. ORM frameworks are verifiably correct in applying ACID (atomicity, consistency, isolation, durability) to database access,

which is an advantage over JDBC.

Answer: A,B,C

Q109. Your company is starting its first project using EJB 3. The developers are familiar with developing web applications

using servlets and MVC web frameworks. Which argument supports the

decision of using EJB 3 on the project?

A. EJB 3 session beans are POJO classes.

B. EJB 3 session beans use the same threading model that servlets use.

C. Database resources are available to every EJB 3 session bean without any developer intervention.

D. EJB 3 session beans can be defined directly inside a WAR file, without requiring a separate EJB JAR file.

Answer: A

Q110. A company has been using the database YourTables for many years. Recently, it started considering a migration to

the database Pregres, which uses a different SQL dialect. Moreover, the SQL engines in YourTables and Pregres have

significant differences in performance when executing the same SQL queries in the presence of advanced SQL features.

Which two persistence approaches offer the easiest migration from YourTables to Pregres for this company? (Choose two.)

A. JPA

B. JDBC

C. CMP entity bean

D. BMP entity bean using JDBC

E. YourTables high-performance driver

F. JDBC rowset with XML serialization

Answer: A,C

Q111. WebLizard is using an application consisting of a single WAR file that exposes a number of web service endpoints

using JAX-WS. What security-related information about an authenticated client is available from inside the web service

endpoint implementation class?

A. only its role

B. only its principal

C. both its role and its principal

D. neither its role nor its principal

Answer: C

Q112. Which three measurements are necessary to determine the availability of an application? (Choose three.)

A. Total downtime

B. Average response time

C. Mean time between failure

D. Application startup timestamp

E. Application shutdown timestamp

Answer: A,D,E

Q113. What are three web service support features in Java EE? (Choose three.)

A. Generating a web service from an MDB

B. Generating a Java class from a WSDL file

C. Associating a Java class with a WSDL file

D. Associating a JMS queue with a WSDL file

E. Generating a web service from a stateful session bean

F. Generating a web service from a stateless session bean

Answer: B,C,F

Q114. A company has a legacy system that it is going to use Java EE technology to re-engineer. The

legacy solution consists of active server pages and a relational database. The company is

interested in changing DB vendors in the future and this requirement is key to moving forward.

This is a web-based transactional sales system. The company will keep the relational database

schema because it still meets business requirements and will not require re-engineering. What is

the best solution?

A. JSP, JDBC only

B. JSP, servlets, JDBC only

C. JSF, servlets, JPA, EJB3

D. JSF, servlets, DAO, JDBC

Answer: C

Q115. Your web site's daily active user sessions have greatly increased. This is degrading performance

because your application container is using all of its resources to manage the volume of active

sessions. You need to deploy in a cluster to scale the application. You have been setting Java

beans into your HTTPsession. Which interface should you implement when re-factoring your

beans to successfully deploy in a cluster supporting session fail-over?

A. BeanContext

B. Serializable

C. Cloneable

D. Accessible

E. Comparable

Answer: B

Q116. You work for a small IT shop. The developers are responsible for deploying production applications. All of the

connection and resource parameters are distributed in the Java source code. Your IT shop has a limited infrastructure so

there have been few issues with pushing production applications. Your IT shop has been purchased and is now reselling

Java products to customers. You now have dedicated development, testing, staging, and production environments. A new

requirement states that these applications must support rapid deployment to each environment. What is the best solution?

A. refactor the Java application to use JNDI names and resource references

B. identify a build engineer that has the responsibility of modifying the constant class for each deployment

C. set your connection properties in a constants class to consolidate connection and resource parameters

D. identify the environment parameters for connection and resources and make them readily available to developers

Answer: A

Q117. What is a purpose of the Web Services Metadata for the Java Platform specification (JSR-181)?

A. to simplify development of web services from JSPs

B. to simplify development of web services from POJOs

C. to simplify development of web services from JMS destinations

D. to simplify development of web services from MDB components

Answer: B

Q118. You are architecting a new web-deployed portfolio management application. The current system used by portfolio

managers is a desktop application. Ease of migration for the portfolio managers is an important consideration. Once the

users have set up and approved a portfolio, you must create a secure TCP connection to a fund trading system to execute

buy and sell orders. Which two technologies are most appropriate for this system? (Choose two.)

A. JSF

B. JMS

C. JAAS

D. JSSE

E. JAX-WS

Answer: A,D

Q119. A travel company wants to outsource the credit card processing functionality needed by their online flight reservations

system. The company wants their application to support the ability to swap third-party vendors without impacting their

application's business model. The credit card processing operation must participate in transactions, to ensure business

constraints are obeyed. Which Java EE technology would most easily support this requirement?

A. JMS

B. UDDI

C. Web Services

D. Java Connector Architecture (JCA)

Answer: D

Q120. Which design pattern is useful for hiding the construction and implementation details of an object?

A. Flyweight

B. Singleton

C. Abstract Factory

D. Chain of Command

Answer: C

Q121.

You are building a web application that must integrate to a content management system (CMS).

Your company currently has a homegrown CMS, but management is considering purchasing a new CMS. Unfortunately,

you have little confidence that their latest choice, BigCMS, is likely to be the final decision. After analyzing the interface to

BigCMS, you find that its interface is different

from the homegrown CMS. Furthermore, you suspect that any other third-party CMS will have yet another interface. What is

the simplest pattern that would isolate your web application from the

interface of the CMS tool?

A. Proxy

B. Bridge

C. Adapter

D. Service Locator

E. Business Delegate

Answer: C

Q122. What is a benefit of using the Transfer Object pattern?

A. Reduces requests across the network

B. Avoids the overhead of using EJB finder methods for large searches

C. Separates the business state and related behavior from the rest of the application

D. Implements parent-child relationships efficiently when implementing Business Objects

Answer: A

Q123. A company created its own MVC-like framework in the years before Struts and JSF. Unfortunately, the company's

Front Controller has become bloated with too many features including fine-grained authorization, view dispatching, and

business logic invocation. Which three patterns could be applied to reduce the complexity of this Front Controller? (Choose

three.)

A. Mediator

B. Command

C. View Helper

D. Intercepting Filter

E. Composite View

F. Application Controller

Answer: B,D,F

Q124. What are two advantages of the Business Delegate pattern? (Choose two.)

A. Increases the scalability of remote services

B. Decouples presentation logic from business logic

C. Avoids unnecessary invocation of remote services

D. Hides underlying communication details of the service

E. Enables transparent persistent storage of the business entity

Answer: C,D

Q125. What are two advantages of a thin client, three-tier architecture over a thick client, two-tier architecture? (Choose

two.)

A. It is more secure.

B. It is more reliable.

C. It is easier to maintain.

D. It makes it easier to manage the application deployment.

Answer: C,D

Q126. Which is NOT a valid reason to separate presentation from business logic?

A. Improved scalability

B. Improved performance

C. Separation of concerns

D. Improved maintainability

Answer: B

Q127. A company is considering re-architecting their application from a two-tier to a three-tier architecture. To see what

impact the new architecture would have on their non-functional requirements (NFRs), they created a prototype. When they

tested the prototype based on their three-tier architecture they noticed, contrary to expectations, that the prototype was less

scalable

than the original two-tier solution. Which two statements explain the result? (Choose two.)

A. Clients end up competing for CPU cycles on the common business logic tier.

B. Clients end up competing for resources on the back-end database used by the application.

C. Clients did NOT share interest in any domain objects, but the business tier spent too much time coordinating among

clients anyway.

D. Clients did NOT share interest in any domain objects and the business tier ran out of memory to represent all domain

objects required by the clients.

Answer: A,D

Q128. Which two statements are true only when implementing rich client applications, and NOT when implementing web

browser-based clients that support only HTML? (Choose two.)

A. Information can be sent to the client by the server, without client polling.

B. Information can be encrypted prior to delivering it to the client and decrypted when received to the client.

C. Information can be compressed prior to delivering it to the client and decompressed when received to the client.

D. Information can be delivered to the client incrementally, without requiring that the server deliver all the information to be

presented to the client on each update.

Answer: A,D

Q129. A bank designed its first-generation web-based banking system around a Java technology rich client application that

interacts with server-side service objects implemented as stateful session beans in a portable Java EE application. For their

second-generation system, the company wants to open the architecture to other types of clients. The company is

considering exposing its

existing stateful session bean service as a web service. Which statement is true?

A. Session beans cannot be exposed as web services.

B. Stateful session beans cannot be exposed as web services.

C. Stateful session beans are automatically exposed as web services.

D. Stateful session beans annotated with @WebService are exposed as web services.

Answer: B

Q130.

Brokers at a firm currently use a two-tier application to execute stock transactions on behalf of their customers. Business

components within the application enforce a number of complex

business rules that ensure that stock transactions are executed properly. Management has

decided that clients should be able to execute their own transactions to streamline operations. Management also wants

clients to run the same existing two-tier application from their home

computers. They have hired you to advise them on how to proceed to ensure that no illegal stock transactions are executed

once the application is available directly to clients. Which two

recommendations should you give to this brokerage firm? (Choose two.)

A. The code already checks for correct execution so they can deliver the application to clients "as is."

B. Checks for correctness should be rewritten as database constraints because the application running on the client might

be modified.

C. The application should be re-architected as a three-tier solution. That way, validation checks can be moved to a

server-side business tier, which remains trustworthy.

D. The application should be obfuscated before it is delivered to the client. That way, clients cannot modify it. Therefore, the

validation checks currently implemented will remain trustworthy.

Answer: B,C

Q131. A travel company re-architected its application from a two-tier to a three-tier architecture. To see what impact the new

architecture would have on its non-functional requirements (NFR), the

company intends to build a prototype based on the new architecture. The company compared the NFR metrics associated

with the new prototype against the metrics from their original two-tier solution. What is an advantage of the original two-tier

solution?

A. It has better availability because it has fewer single points of failure.

B. It has better manageability because each client has its own copy of the application.

C. It has better performance because each client must use its own set of domain objects.

D. It has better scalability because each client can access the database independently of other clients.

Answer: A

Q132. The Java system you are enhancing needs an integration point to an external system to gain

access to data stored in a database. The application uses an open database connectivity data source to access data. What

do you use to connect to the database?

A. XML over HTTP

B. RPC-style SOAP

C. RMI-IIOP and EJB

D. JDBC-ODBC bridge driver

Answer: D

Q133. Java Connector Architecture (JCA) as a technology solution addresses certain needs for your Java applications.

What is the best description of a JCA solution?

A. Asynchronous message-based interfaces

B. Integration of slow responders in a loosely-coupled way

C. Access tightly-coupled business logic of legacy systems

D. Integration of systems/components and guaranteeing message delivery

Answer: C

Q134. Your client is interested in the benefits of integration with an external system using RMI-IIOP, RMI- JRMP, and

CORBA for external integration. What should you tell your client?

A. An RMI-JRMP client can call a CORBA server.

B. A CORBA client can call an RMI-JRMP server.

C. An RMI-JRMP client can call an RMI-IIOP server.

D. A CORBA client CANNOT call an RMI-IIOP server.

Answer: C

Q135. Your online e-commerce application has a message-driven bean (MDB) that calls an email server.

Which statement about invoking the MDB is true?

A. The client can access the MDB directly.

B. The client accesses the MDB using an interface.

C. A message-driven bean is simply a JMS message provider.

D. A JMS message is sent to the destination to which the MDB is listening.

Answer: D

Q136. SOAP was selected as an integration technology for the flexibility of messaging styles it supports (in particular, how

an XML payload can be presented in a SOAP message). Which message-style statement is correct?

A. The body of an RPC-style SOAP message cannot be a literal message.

B. The XML payload for a document-style message cannot be an encoded message.

C. The XML payload for RPC and document-style messages guarantee XML payload delivery.

D. An RPC-style message has the XML payload wrapped inside an operation element in a SOAP body.

Answer: D

Q137. As part of your Java application, you are required to integrate with an external system that has a

Java web service. The Java web service is using synchronous communication and exposes

several methods with varying method signatures. Which technology do you use for this solution?

A. JMS

B. SOAP

C. RMI-IIOP

D. RMI-JRMP

Answer: B

Q138. Your company is going through an extensive security audit and it has been identified that your Internet-facing web site

is vulnerable to SQL injection from authenticated users. Which two are appropriate for mitigating this threat? (Choose two.)

A. Using security roles in the deployment descriptor

B. In stored procedures called with prepared statements

C. Adding an Intercepting Validation filter to your system

D. Requiring SSL in the deployment descriptor transport guarantee

Answer: B,C

Q139. Your competitor is trying to crash your web site by using various Denial of Service attacks. Which two flaws should

you protect against for this specific threat? (Choose two.)

A. SQL injection

B. buffer overflow

C. Man in the Middle

D. session hijacking

E. weak password exploits

Answer: A,B

Q140. Which is an appropriate technique for minimizing the consequences of a successful attack?

A. Input validation

B. Principle of least privilege

C. Encryption of wire transmissions

D. Use of strong/two-factor authentication

Answer: B

Q141. What is the appropriate location to configure a JSP-based application to require secure communication between a

browser and particular resources?

A. In the application code

B. In the business-tier code

C. In the browser configuration

D. In the deployment descriptor

E. In the web server configuration

Answer: D

Q142. Which five statements about SecurityManager are true? (Choose five.)

A. The SecurityManager must be instantiated to use RMI.

B. The SecurityManager object can be discarded after loading.

C. The SecurityManager can be configured from a per-user file.

D. The SecurityManager can be configured from a system-wide file.

E. The SecurityManager object can be installed in the application code.

F. The SecurityManager object can be installed from the command line.

G. The SecurityManager can be configured from a file specified on the command line.

Answer:

Answer: C,D,E,F,G

Q143. A company is in the business of distributing hard candies. The distribution of these candies is automated and the

system that helps track information about candy distribution is written in Java technology. The business unit for the company

has been asking the IT group to provide a flexible reporting system to track detailed information. A large amount of data

about candy is stored using a DAO layer, but little is used. What is the best solution for the IT group to implement to provide

the most flexibility for the business unit?

A. refactor the DAOs to include additional static queries to pull information and export a spreadsheet for the business unit to

review

B. Implement an ad-hoc query tool exposed using JSF that allows business units to create queries and produce results in a

given format

C. Provide a JSP page, which has scriptlets that expose pre-defined queries for the business unit to execute and display in

HTML

D. Create a web service that exposes fixed queries invoked by a JSP client that can pull data from the database and export

in a given format

Answer: B

Q144. As part of your SOA infrastructure, you are interested in implementing a client that can request information about

businesses worldwide from a UDDI registry. Which Java EE API provides interfaces for gathering data about these

businesses?

A. StAX

B. JAXB

C. JAXP

D. JAXR

Answer: D

Q145. A retail company has a dashboard application that lets executive decision makers view current

business information. This information includes gross sales, returned goods dollars, cost of labor, and other information. The

information is updated on a continuous basis using a JMS queue. None of this information is critical, so the loss of a few

messages is acceptable. Which JMS

delivery mode meets these requirements and optimizes performance?

A. Best-effort

B. At-most-once

C. Store-and-forward

D. Once-and-only-once

Answer: B

Q146. A Java EE travel agency application builds flight itineraries and needs to provide runtime monitoring to external

clients. Agency managers need to find out at any given time how many itineraries have been started but not completed. This

information should be made available to at managers runtime using open-source or commercially available management

tools. The instrumentation should be done with a standard Java EE API. How should you instrument the application?

A. JPA

B. JMX

C. JMS

D. SNMP

Answer: B

Q147. Which Java EE feature helps facilitate migration to SOA?

A. Stateful session beans can be exposed as web services.

B. Stateless session beans can be exposed as web services.

C. Stateful session beans support local and remote interfaces.

D. Stateless session beans support local and remote interfaces.

Answer: B

Q148. Your company has a web site that was created exclusively in JSP pages. The company now

wants to add role-based security to the site to limit access to certain pages. Which three are used to facilitate this

authorization mechanism? (Choose three.)

A. a servlet Front Controller

B. EJB security constraints

C. a servlet Filter to intercept HTTP requests

D. web resource constraints in the deployment descriptor

Answer: A,C,D

Q149. Which two provide data binding between the HTTP request parameters and a server-side Java

object? (Choose two.)

A. JavaServer Pages with the standard tag

B. JavaServer Faces with expressions of the form ${ty}

C. JavaServer Faces with expressions of the form #{ty}

D. JavaServer Pages with expressions of the form #{ty}

E. JavaServer Pages with expressions of the form ${ty}

Answer: A,C

Q150. A fashion web site has many small chunks of content that web designers cut-and-paste in many pages. Over time,

inconsistencies have emerged as one designer alters the HTML of a given chunk. As an architect, one of your tasks is to

introduce a mechanism to be used by the web designers to isolate these chunks and keep them consistent. Which two

technologies allow web designers to isolate and reuse these chunks of HTML? (Choose two.)

A. tag files

B. simple tag handlers

C. classic tag handlers

D. JSP include directive

E. JSP forward directive

F. JSP Expression Language

Answer: A,D

Q151. As the architect for a company's product development department, you have been tasked with

designing the next generation of money management tools for high net worth individuals. Sold at

a premium price and with guaranteed server-side resources for each logged-in user's session,

MyMoney Pro provides real-time feeds on stock, bond, and mutual fund prices to the user as well as the ability to execute

trades with a response time of two seconds or less. Java Swing is used

to build the client-side application to provide the rich end-user experience deemed necessary,

and the persistence tier will be implemented as CMP entity beans. What is the most appropriate

server-side component to use to model and hold the client's session state and resources in the

MyMoney Pro application?

A. An entity bean

B. A stateful session bean

C. The HttpSession object

D. A stateless session bean

Answer: B

Q152. An online footwear retailer wants to deploy a blogging web site about the footwear industry to help generate more

traffic to its e-Commerce web site. The company wants to create the blogging site using Java EE technologies to make sure

that every blog entry is indexed by search engines. Which Java EE technology should the company use to create its

blogging site?

A. A JSF-oriented application using EJBs and JPA for persistence

B. A JSP-oriented application using EJBs and JPA for persistence

C. A web-centric JSF-oriented application using JPA for persistence

D. A web-centric JSP-oriented application using JPA for persistence

Answer: D

Q153. What is a disadvantage of JSP technology as compared to JSF technology?

A. JSP requires scriptlets to access request parameters.

B. Developers of JSP pages must be Java programmers.

C. JSP technology does NOT provide APIs for form validation.

D. JSP pages are slower because they are interpreted by the web container.

Answer: C

Q154. A company that sells footwear hired a junior-level developer to create their order-entry workflow using JSPs. The

developer hard coded all the business logic into scriptlet-intensive JSPs. The resulting spaghetti code became too much for

the developer to maintain. The company then hired a Sun Certified Enterprise Architect (SCEA) to help fix the problem.

Which design pattern would be best for the order-entry workflow?

A. View Helper

B. Front Controller

C. Composite View

D. Service to Worker

E. Business Delegate

Answer: D

Q155. As the architect for a corporation, you are focused on how best to design the persistence layer of the in-house stock

inventory application. Key operations that must be supported, in addition to

insert, read, update and delete are: bulk updates and deletes, complex queries including sub

queries, JOINs and dynamic queries. Ease of development and a future-proof approach is

important, but you realize that ease of development is academic if the approach selected does

NOT meet the core technical requirements. What is the best approach to architecting the

persistence layer for the application?

A. Use entity beans, accessed by a session bean layer to provide unit-of-work, security and transaction semantics

B. Use JDBC-based layer, accessed by a session bean layer to provide unit-of-work, security, and transaction semantics

C. Do NOT provide a logically distinct persistence layer, but rather use session beans to access the database directly using

JDBC

D. Use a JPA-based persistence layer, accessed by a session bean layer to provide unit-of- work, security, and transaction

semantics

Answer: D

Q156. Your company supports multiple versions of a web service implemented using a stateless session

bean. Initially, it was expected that the interface would grow over time with the addition of new

methods, but now substantial changes are needed to several of the existing methods. Your

company's clients are concerned that having old and new methods side by side would result in

unwieldy interfaces. As you review the changes, you realize that the behavior behind the old and new operations is identical

and the suggested changes are only a matter of refactoring the

operation signatures and the data types used. Which approach would you recommend to handle this situation with minimal

disruption?

A. Customize the existing web service interface using annotations until it identical to the new one

B. Have the existing stateless session bean class implement the new web services interface alongside the old one

C. Create a new stateless session bean with the new web service interface and have it delegate to the existing web service

implementation class

D. Duplicate the code in the existing stateless session bean class, then make the necessary changes to its web interface

and rename them accordingly

Answer: C

Q157. A company is designing a customer relationship management (CRM) system. All data is to be

stored in a relational database and accessed by multiple applications using a single persistence

layer. The data model includes complex relationships between tables. Application requirements

include disconnected operations to benefit the sales force in the field, complex queries to

discover under-served customer segments, and the ability to perform bulk updates on data as corporate clients relocate or

are acquired by former competitors. Which persistence technology best supports these requirements?

A. JPA

B. CMP entity bean

C. BMP entity bean with JPA persistence layer

D. BMP entity bean with JDBC persistence layer

Answer: A

Q158. You are designing an extension to an existing, high-volume Java EE-based e-commerce

application that provides enhanced customization and personalization features to users. Users must be able to change both

the content and look and feel of what they see on the home page, add favorite items to a "My Favorites" area, and have

items suggested to them by the application based on prior purchasing behavior. All site actions participate in a new or

existing transaction to track and audit user behavior across the site for later analysis. Given these requirements, what is the

most appropriate server-side component, or method to use to provide access to the configurable options stored by the

e-commerce application?

A. Accessing the persistence tier directly from the presentation tier (JSPs)

B. A stateful session bean accessing a well-defined persistence tier using the DAO design pattern.

C. A stateless session bean accessing a well-defined persistence tier using the DAO design pattern.

D. A Plain Old Java Object (POJO) accessing a well-defined persistence tier using the DAO design pattern

Answer: C

Q159. Your company requires all its developers to use a well-specified set of exception classes to model

a number of common error conditions, many of which are specific to its business. These

exception classes are centrally maintained and come packaged in a library (a JAR file). The

application you are developing needs to report a number of error conditions covered by this

library to remote clients. Which pairing of component type and remote access technology enables

client applications to use the predefined exceptions as part of their natural programming model?

A. servlet accessed using HTTP

B. entity bean accessed using web services

C. stateless session bean accessed using RMI

D. message-driven bean accessed using a JMS queue

Answer: C

Q160. A successful web application is used by over two hundred thousand users. Due to this substantial

load, the database is overburdened and fails frequently. All data, including critical user records

and temporary session data, are stored in the database. Because of resource constraints, a new

database system cannot be installed. Which change will reduce the load on the database?

A. Create more entity beans to optimize the interaction with the database

B. Refactor the web application to use DAOs to communicate with the database

C. Refactor the web application to store temporary session data on the web servers

D. Add more web servers to the web tier to distribute the load and reduce the number of transactions on the database

Answer: C

Q161. You are the architect on a project developing a web site to give fashion advice to teenagers. The content on the site

is largely static, but there is a small amount of per-user customization. The actual content, including the style and layout of

the site, changes often to ensure a fresh look. Many graphic designers work on the site for short periods of time. The

underlying content

management software does not change often and the web site runs in an environment with

reasonable security in place. What is your primary architectural concern?

A. Deploying the entire web site as JSPs so the content is easier to manage

B. Designing a multi-tier, service-oriented architecture to handle fail-over and ensure high availability

C. Designing a template-based solution to ensure that static content is separated from dynamic content

D. Deploying a DMZ, a secure database, and an encrypted JDBC driver to ensure that user data is protected

Answer: C

Q162. You are architecting the layers for a complex n-tier web application. Which two pairs of technologies do NOT exhibit

direct dependencies? (Choose two.)

A. EJB to RMI

B. Linux to JDBC

C. HTML to Firefox

D. Tomcat to Servlets

E. SunFire E20k server to Java EE

Answer: B,E

Q163. In which two ways does the Value List Handler pattern support separation of concerns? (Choose

two.)

A. It centralizes business logic and state.

B. It encapsulates access to business services.

C. It uses DAOs to encapsulate access to persistence.

D. It helps focus list management logic in the business tier.

Answer: C,D

Q164. Which pattern exists primarily to separate concerns?

A. DAO

B. Transfer Object

C. Session Facade

D. Composite Entity

Answer: A

Explanation:

Q165. DRAG DROP

Click the Task button.

Answer:

Q166. Which technology is NOT capable of implementing a Front Controller?

A. servlets

B. servlet filters

C. JavaServer Faces

D. JavaServer Pages

E. session context listeners

Answer: E

Q167. Which web framework supports declarative data conversion between text and arbitrary Java objects?

A. servlets

B. JavaServer Faces

C. JavaServer Pages with

D. JavaServer Pages with the Expression Language

Answer: B

Q168. You must build a web application with simple form processing. The backing data model has

JavaBeans-styled accessor methods that handle textual data only. This application must be

maintained by non-programmers. What is the simplest architecture for this web application?

A. JavaServer Faces (JSF) only

B. JavaServer Pages (JSP) with scriptlets

C. JavaServer Pages with a servlet controller

D. JavaServer Pages with JSP standard tags

E. JavaServer Pages with the Expression Language

Answer: D

Q169. A company hired a web designer to create a fresh look for their web applications. The designer created several new

UI components that require a complex interaction between HTML and the JavaScript language. The architect needs to

choose a combination of server-side technologies to accommodate these new components. Which two technology

combinations, used independently, satisfy this requirement? (Choose two.)

A. JSP with tag files

B. servlets with custom filters

C. JSF with custom components

D. JSF with the Expression Language

E. servlets with the Expression Language

Answer: A,C

Q170. A company is extending its product suite to allow users to augment existing application content

with their own content (images, documents, audio and video files). All content is stored in

relational databases and transaction support is required. The user interface should run on all

mainstream browsers and platforms. The company wants the web designers (technical

personnel, but not Java developers) to be able to edit the pages directly to update the

presentation of user content continuously over the life of the application. Providing a compelling

user experience is an important consideration. Which architecture is optimal for handling the

user-submitted content?

A. a MVC web framework to access the content using entity beans

B. a MVC web framework with Ajax to access the content using JSP tags and POJOs

C. a MVC web framework to access the content using stateful session beans and entity beans

D. a MVC web framework with Ajax to access the content using stateless session beans and JPA

Answer: D

Q171. A company wants to design an internal web site for the purpose of managing its numerous social events. The site will

not have heavy traffic, but will require state to be persisted in a database. You have been tasked to complete this action item

in your spare time. Which two Java EE based approaches are best used for a quick development? (Choose two.)

A. Use JPA in the web tier only

B. Use message-driven beans to manage the posting of events

C. Use your domain model components as JSF managed beans

D. Use an EJB container to service inject the domain model and support a JPA deployment

Answer: A,C

Q172. An airline flight monitoring system must notify several other systems when a flight's status changes. All of the systems

are written in the Java programming language and located on the same local area network. One of these systems, the crew

scheduler, must receive all flight status changes. If the crew scheduler system is down, it must receive all status changes

when it restarts. How should the crew scheduler receive flight status changes?

A. As a JMS durable subscriber

B. Using XML over HTTP with correlation IDs

C. Through a Java Connector Architecture adapter

D. As an asynchronous RPC-style SOAP web service

Answer: A

Q173. Your new application incorporates messaging. If the receiver is down, the message is stored by the sending

component. When the receiving application becomes available, all of the stored messages are delivered. Which solution is

most appropriate?

A. JMS with asynchronous communication

B. JMS with synchronous communication

C. RPC with asynchronous communication

D. RPC with synchronous communication

Answer: A

Q174. Your application depends upon heavy web services communication that distributes large XML objects over HTTP.

Your architecture is event driven and you require the creation of bi directional XML parsers that are fast, easy to implement,

and have a low memory footprint. Which Java EE API is best suited for your solution?

A. StAX

B. DOM

C. JAXB

D. JAXR

Answer: A

Q175.

You are a client of an XML over HTTP web service. You need a Java API that can enable your

application to parse and transform XML documents independent of a particular XML processing implementation. Which

Java API can you use?

A. SAAJ

B. JAXP

C. JAXR

D. JAX-RPC

Answer: B

Q176. An application sends four messages (1, 2, 3, and 4) to a JMS destination. Three consumers (A, B, and C) consume

messages from the destination. There are no delivery failures.

A receives messages 1 and 2.

B receives messages 1 and 3.

C receives messages 1 and 4.

How do consumers receive these messages?

A. A, B, and C listen to a JMS queue with message selectors.

B. A, B, and C listen to a JMS queue without message selectors.

C. A, B, and C subscribe to a JMS topic with message selectors.

D. A, B, and C subscribe to a JMS topic without message selectors.

Answer: C

Q177. Your organization has an existing web-based Java e-commerce application that provides remote EJB interfaces.

Your organization is interested in architecting a separate Java billing application that leverages some of the business logic

contained in the e-commerce application. Which

technology is ideal for this application?

A. JMS

B. JDBC

C. Java IDL

D. RMI / IIOP

Answer: D

Q178. Your web page design company is designing web sites for all of the stores in a local mall. Your company must create

a consistent "look and feel" for these sites. Once this "look and feel" project

has gone through demonstration, enhancement, and approval iterations with the mall's clients,

your job will be done, and the development of the actual B2C (business to client) system will be

handled by a different firm. Which architecture is most appropriate for your prototype project?

A. Two-tier, web-centric

B. Three-tier, web-centric

C. Three-tier, enterprise-centric

D. Three-tier, application-centric

Answer: A

Q179. In order to handle your n-tier application's persistence requirements directly from web-tier

components, which three statements about your application should be true? (Choose three.)

A. Your application will NOT need to use DAOs.

B. Your application has no need for an LDAP server.

C. Your application is such that scalability is NOT a concern.

D. Your application has no need for concurrency management.

E. Your application has no need for container managed transactions.

Answer: C,D,E

Q180. ABC Travel offers a flight reservation service, exposed as a web service. XYZ Stays offers a hotel reservation service,

also exposed as a web service. ABC and XYZ will not change their web

services. A startup company has contacted you for advice about designing a new service that

combines flight and hotel reservations, which they will offer as a web service. The startup

company plans to provide their service by implementing a portable Java EE solution that

aggregates the two services offered by ABC Travel and XYZ Stays. A combined reservation

succeeds only if both the flight reservation and the hotel reservation succeed. What is the most effective way to meet the

business requirement?

A. The startup company should implement their new service as a web service that uses an XA transaction manager.

B. The startup company cannot implement their new service as a web service, but must use an EJB component to gain

transaction propagation.

C. The startup company should implement their new service as a web service by calling the two existing services, and

implementing their ow compensating transaction.

D. The startup company can implement their new service as a web service by calling the two existing services in a single

transaction, relying on transaction propagation to support this business rule.

Answer: C

Q181. A company is developing a new web application to handle the entry of medical claims for processing. Hospitals and

doctor's offices enter the claim into the new system instead of sending the paperwork to the company's offices. The

company does NOT want to install software on the client side. In an effort to reduce network traffic and server processing, it

wants all data entry checks to complete on the client side. The user interface must be maintained by non

programmers. Which user interface should the company architect?

A. use JSF

B. use JSP with JSTL

C. use Ajax with a servlet controller

D. use Java Swing distributed by JNLP

Answer: B

Q182. Your application accepts documents from unknown third parties over an encrypted connection.

The documents are accompanied by a digital signature that attests to the origin of the document.

Which aspect of the system limits the degree of confidence you can have in the origin of any given document if the

implementation of all software is flawless?

A. The strength of the signature algorithm

B. The number of bits used in the signature

C. The strength of encryption used to hide the conversation

D. The certification practices associated with the certificate

Answer: D

Q183. You are architecting a DVD rental application that accepts customer feedback. Users can rank movies from one to

five by clicking on buttons, as well as input comments about the movie into a text box. Which two can be addressed by

filtering special characters from text boxes on JSP

forms? (Choose two.)

A. SQL injection

B. buffer overflow

C. authorization errors

D. cross-site scripting

Answer: A,D

Q184. Security restrictions in a use-case require that the behavior of an EJB business method vary according to the role of

the user. How should this be achieved?

A. The deployment descriptor is written using the roles determined by the programmer.

B. The programmer determines a role reference and uses it in the code. This is mapped to a role in the deployment

descriptor.

C. The business method determines the role of the user using JNDI and configuration information in the deployment

descriptor.

D. The business method determines the role of the user using JAAS and configuration information in the deployment

descriptor.

Answer: B

Q185. What is a major design characteristic of the Service To Worker pattern?

A. Control of transactions

B. Separation of concerns

C. Control of network traffic

D. Integration of legacy systems

Answer: B

Q186. An architect is designing a web application to support a broad array of web requests. During

analysis, the architect discovers that the application must perform complex logic to handle the

various requests it can receive. Additionally, the architect learns that each type of request has

specialized logic to perform. The architect knows that over time, new types of requests will be

added to the system. Given this scenario, which architecture is the easiest to expand and test?

A. Embedding the common logic in each of the application's JSPs

B. Creating a controller object with a method of handling each JSP

C. Creating a controller object coupled with numerous command objects

D. Creating a service activator object and linking it to specialized business service objects

E. Creating a transfer object for each JSP and coupling those transfer objects with a front controller

Answer: C

Q187. You are architecting a document storage system for next season's fashion designs. The system must support many

different encryption algorithms to secure those documents. Security of the

documents is the highest priority of the system. What are two valid concerns in this situation?

(Choose two.)

A. The most scalable solution is to use public key encryption for all encryption.

B. The system software must be able to be updated without decrypting all the files in the system.

C. A single API should be used for all encryption algorithms allowing them to be used interchangeably.

D. Each encryption algorithm should be deployed to its own server to keep deployment and configuration simple.

E. Documents in the system can be stored unencrypted if the storage servers are properly secured behind a firewall and

DMZ.

Answer: B,C

Q188. With which two is the service-oriented architecture concerned? (Choose two.)

A. low cohesion

B. loose coupling

C. XML web services

D. stateful session handling

E. well-defined contracts

Answer: B,E

Q189. Which two statements describe the advantages of inheritance as compared to coding to an interface? (Choose two.)

A. The reuse of existing code implementations.

B. Allows you to use one object in place of another.

C. Inheritance allows you to restrict the behavior of objects.

D. Inheritance promotes encapsulation better than interfaces.

E. Only through inheritance can an object be of multiple types.

Answer: A,C

Q190. You are architecting a complex multi-tiered web application. Within each tier you have designed layers, the lowest

being the hardware layer and the highest being the application layer. Which statement is true?

A. Generally, a given layer in one tier of this application should be concerned with the technology used in the same layer of

adjacent tiers.

B. To maximize separation of concerns, a given layer in a tier of this application should only have knowledge of the adjacent

layer in that tier.

C. For any given tier, separation of concerns is fulfilled when a given layer in that tier knows or needs to know little or nothing

of the layers below it.

D. If the layers in one tier of the application have been designed to achieve separation of concerns, then the remaining tiers

also achieve separation of concerns by default.

Answer: B

Q191. Which three are benefits of design patterns? (Choose three.)

A. They act as a learning aid.

B. They provide standard code libraries.

C. They provide a common design vocabulary.

D. They are best suited for implementation details.

E. They standardize the way designs are developed.

F. They provide a standard object-oriented development process.

Answer: A,C,E

Q192. A company is required by law to log and store comprehensive information on all access requests made to its business

logic API. Which design pattern is most suitable to provide this information with a minimum of disruption to the existing

servlet-based implementation?

A. Business Object

B. Session Facade

C. Intercepting Filter

D. Dispatcher View

Answer: C

Q193. What are two consequences of using the Observer pattern? (Choose two.)

A. The source is loosely coupled with the observer.

B. Changes in a source are broadcast to all observers.

C. The observer must be tightly coupled with the source.

D. An observer is restricted to observing only one source.


本文标签: 统计 出现 质量