Scea Exam Questions 3 Copy

Embed Size (px)

Citation preview

  • 7/27/2019 Scea Exam Questions 3 Copy

    1/24

    1.You are the architect of a new web application that must support a wide variety of requests with the potential that each request can have varying degrees of specialized logic. This system must support a flexible and extensible mechanism for your developers to add request logic.

    Which design implementation should be selected to maximize flexibly and extensibility?

    A. Implement a controller object to perform action management.B. Implement a front controller with a command handler.C. Implement command objects and import them onto all JSP pages.D. Implement scriptlets with page specific logic embedded into all JSP pages

    Reference CloseCore J2EE design patterns - Front Controller/Command Handler (Alur, Crupi, Malks).

    Option B is correct.Option A is incorrect because just a controller alone is not the best solution for extensibility.Option C is incorrect because command objects are correct but importing on eachJSP page is not appropriate for this solution. It does not address flexibility or extensibility.

    Option D is incorrect because embedding logic in JSP pages allows for the leastamount of flexibility.

    2.Which two statements describe the advantages of designing an application usinginheritance compared to designing and application using interfaces? (Choose two.)

    A.Inheritance enforces encapsulation while interfaces do not.B.Inheritance allows you to restrict the behavior of objects.C.Inheritance is a way to form new classes using classes that have already beendefined.D.Inheritance allows you to utilize an object in place of another object.

    Reference CloseGang of Four - Inheritance (white-box reuse).

    Options B, C are correct.Option A is incorrect because interfaces do help enforce encapsulation.Option D is incorrect because it allows you to utilize properties and methods ofother objects.

    3.Which two statements are true about a Model View Controller design approach with regards to separation of concern? (Choose two.)

    A.Using a Model View Controller approach implies coupling business functionalityand presentation of views.

    B.Implementation logic is tightly coupled between the View and Model.C.A modification to the View will correspond to a modification of the Model.D.The Controller is the only part that knows about both the Model and the View.E.The design approach using a Model View Controller does address the separationof concern principle

    Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition- Third Edition.

    Options D, E are correct.

  • 7/27/2019 Scea Exam Questions 3 Copy

    2/24

    Option A is incorrect because separation of concerns and MVC design implies loose coupling so there should not be significant coupling of the business layer andpresentation layer.Option B is incorrect because the view and model should not know each others implementation logic.Option C is incorrect because it again defines a scenario of coupling where a change in one aspect requires a change to another.

    4.The online betting application in production originally expected less than 5000 users a day because of the small market share the application caters to. You have expanded the services offered in this application and there has been a massive increase in users visiting your site. This has caused latency with response time. You have recommended adding 2 new web servers and 3 new application servers.

    What is the impact of adding additional servers?

    A.This will increase availability, extensibility, and decrease performance.B.This will decrease manageability, performance, and increase maintainability.C.This will increase availability, performance, and reliabilityD.This will decrease manageability, performance, and increase availability

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Option C is correct.Option A, B, D are incorrect because adding the additional servers will increasethe performance of the application. The single web and application server had been experiencing overload and the result was latency of the application responsetime.

    5.You need to implement a printer controller. You want to control access to a series of printers and route print jobs. You only want one instance of this classbecause the algorithms used in job routing depend on this object holding exclusive control over the printers.

    What pattern will give you clear separation of concern?

    A.Factory methodB.Builder patternC.Singleton patternD.Prototype pattern

    Reference CloseCore J2EE Patterns Second Edition: (Alur, Crupi, Malks).

    Option C is correct.Option A is incorrect because the factory method provides a simple decision making class which returns one of several possible subclasses of an abstract base cl

    ass depending on data it is provided.Option B is incorrect because the builder pattern separates the construction ofa complex object from its representation, so that several different representations can be created depending on the needs of the program.Option D is incorrect because the prototype pattern starts with an initialized and instantiated class and copies or clones it to make new instances rather thancreating new instances.

    6.Currently your application is deployed on a single application server and CPU

  • 7/27/2019 Scea Exam Questions 3 Copy

    3/24

    utilization is often maximized. You are going to remove static content and placethe static content onto a web server.

    What would be a valid reason for removing the static content?

    A.This will accomplish nothing because you will have no way to access the staticcontent on the web server from your application server.B.The application server is generally performing critical work, indicating thatit is best to move static content serving off of the application server machine.C.It is easier to implement a solution where static content resides on a web server and requires no configuration changes to implement.D.Packaging and placing the static content outside of the WAR file has no effecton manageability and maintainability

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Option B is correct.Option A is incorrect because you can get access to your web server from your application server. This will require a combination of network changes, re-writing, and additional modifications that do add to the work load.Option C is incorrect because it adds difficulty and resources to make this solution work.Option D is incorrect because deployments will require more coordination with gr

    oups, and manageability will increase with maintainin your static content on oneserver and your application code on another.

    7.Your organization has a legacy thick-client application. The issue is that thepresentation and business logic are currently coupled. A change in presentationlogic requires a change in business logic. A suggestion is to re-factor this into a three-tier application and separate the business logic from the presentation logic.

    What non-functional requirement would you improve by separating the presentationlayer from the business layers?

    A.SecurityB.Response TimeC.ManageabilityD.MaintainabilityE.Performance

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Option D is correct.Option A is incorrect because securing a one-tier application is generally easier than securing a three-tier application. With a three-tier you need to secure the web server, application server, and database.Option C is incorrect because manageability of one-tier application is generally

    easier than tree-tier application. With a three-tier you need to manage the health the web server, application server, and database.Options B, E are incorrect because performance and response time of a one-tier system should be better than a three-tier. With a three-tier application the request/response cycle includes a web server, application server, and database.

    8.consulting application architecture team has been brought in to help you design a web application prototype. You need to design a quick prototype to representthe web application with minimal amount of infrastructure resources. You will b

  • 7/27/2019 Scea Exam Questions 3 Copy

    4/24

    e utilizing an existing database for the prototype. This prototype will need tohave minimal functionality and emphasize more browser-based look and feel qualities, rather than functionality.

    What is the correct architecture to implement for this prototype?

    A.Three-Tier prototype with web server, application server, and database.B.Thick client prototype that requires client PC install and database.C.N-Tier prototype with web server, exchange server, application server, and database.D.Two-Tier prototype with web server and database.

    Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition- Third Edition.

    Option D is correct.Options A, C are incorrect because there are clearly limited resources and adding additional resources will not add value to the prototype based on this example.Option B is incorrect because the prototype should reflect a web front end. Youcan get close to emulating rich clients but the appropriate solution is to implement a prototype that will represent the look and feel of the end product.

    9.You have been contracted to architect a new accounting system. The system you

    are going to replace currently runs on two webservers and one database server. The business logic is implemented using stored procedures. You have proposed to architect the new system using 3 web servers, 2 applications servers, and one database server. You are going to write the business logic in Java and deploy to the application server, and push the presentation logic onto the web servers.

    What are three benefits of your proposed architecture? (Choose three.)

    A.Decreased scalabilityB.Thin ClientsC.Improved separation of business logicD.Tight coupling of business logic and presentation tierE.Thick clients

    F.Improved scalability

    Reference CloseThe Java EE 5 Tutorial, Third Edition: For Sun Java SystemApplication Server Platform Edition 9.

    Options B, C, F are correct.Option A is incorrect because you will increase scalability with a Three-Tier architecture. You can add a web server, application server, and so on.Option D is incorrect because you will decouple the Two-Tier architecture by separating the business logic to the application server and presentation logic to the presentation tier.Option E is incorrect because you separated the business logic from the presentation layer, making the client thin.

    10.Which two statements are true about Vertical Scalability? (Choose two.)

    A.You can increase the application servers in you middle tier from 3 to 5 servers.B.Vertical Scalability will decrease manageability.C.You will increase the capacity of your quad core server by upgrading memory.D.The system architecture will require little if any changes.E.Vertical Scalability is more complex, difficult, and requires more application

  • 7/27/2019 Scea Exam Questions 3 Copy

    5/24

    changes

    Reference CloseThe Java EE 5 Tutorial, Third Edition: For Sun Java SystemApplication Server Platform Edition 9.

    Options C, D are correct.Option A is incorrect because this is an example of horizontal scalability.Option B is incorrect because vertically scaling should have some minimal impacttom manageability. If anything the health of the system should increase with more power or memory.Option E is incorrect because horizontal scaling is more complex with regards toadditional web servers, application servers, clustering, and server farms working together as one cohesive unit.

    11.Your application is deployed on a single application server with a single database server. For the phase two release you will be deploying into a cluster ofapplication servers and utilize a database server farm. You will also be introducing new design patterns, business logic, and rich UI components.

    Which is positively impacted with the least amount of effort?

    A.ScalabilityB.Manageability

    C.MaintainabilityD.Security

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Option A is correct.Option B is incorrect because there is a negative impact with regards to manageability. To keep the system healthy you will need to manage several new resourcesand identify potential risks involved. This will require more effort than addressing the single application and database server.Option C is incorrect because there is a negative impact with regards to maintainability. You are introducing new patterns, UI components, and business logic. T

    his will increase the maintenance required to resolve defects and/or apply fixes, and will also create new defects.Option D is incorrect because there is a negative impact with regards to security. The additional resources will introduce vulnerabilities that will have to bemanaged. You are no longer responsible for securing a single application/database server.

    12.You originally designed your application to run in a cluster with four nodes.This design is forward thinking because currently your web application handleslight loads. You anticipated using multi-cast to communicate session informationacross the nodes. Unfortunately, the infrastructure is not ready but your application is. You are going to deploy it to a single application server until the i

    nfrastructure is ready.

    Which two will be negatively impacted from this decision? (Choose two.)

    A.SecurityB.ManageabilityC.ScalabilityD.AvailabilityE.Maintainability

  • 7/27/2019 Scea Exam Questions 3 Copy

    6/24

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Options C, D are correct.Option A is incorrect because there will be a positive impact with security because it will be easier to detect vulnerabilities in a single resource than several. When you introduce the cluster and several new resources you will need to worry about the additional resources.Option B is incorrect because there is a positive impact with regards to manageability. It is easier for you to manage the health of the single server than thecluster.Option E is incorrect because it will be easier for you to resolve and maintaindefects and deploy to a single machine than it will be to maintain all current code for all nodes. You could have code version problems, library issues, etc.

    13.Internal users of your new application are complaining that the new web frontend does not perform the same as the thick client version they where using before. You are going to re-design the application to use readily available JavaScript libraries including AJAX to enhance the user experience. This will require large library downloads to the client and introduce volumes of JavaScript.

    What are three drawbacks of this implementation? (Choose three.)

    A.Portability to all browsers with minimal re-work for cross browser compatibili

    ty.B.Readily available development tool kits to support automated testing, debugging, re-factoring.C.Reduction of page refreshes to enhance user experience.D.Simulating client state on the browser and reducing the number of views.E.Maintainability will be decreased by removing flow from Java source to JavaScript.

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Options A, B, E are correct.Option C is incorrect because using AJAX and JavaScript libraries will allow youto design a client that can mock state and minimize page refresh to simulate th

    ick clients.Option D is incorrect because simulating the client state is a way to address the thick client.

    14.Your new application requirements include dynamic front ends, personalized pages, personalized colors, and personalized fonts. Users should be able to accessany system and bring up their customized experience without having to save their preferences locally. This system will be used by all hotels in the chain and there is no interest to have to support each hotel individually. The front end solution should be easy to debug.

    What is the solution for this new architecture?

    A.A thin user interface that is browser based and utilizes JSP's and CSS with user preferences saved locally in a cookie.B.A thick client user interface utilizing AWT and user preferences saved locallyin a cookie.C.A thick client user interface utilizing Swing and user preferences saved locally in a cookie.D.A thin browser based client utilizing JSF and CSS with user preferences persisted to the database.

  • 7/27/2019 Scea Exam Questions 3 Copy

    7/24

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Option D is correct.Options A, B, C are incorrect because users want to use any machine and not haveto save their preferences locally. Cookies save local information but a user would need to address preferences on a machine that did not have a saved cookie orhad a deleted cookie.

    15.Which two statements are true about the Java EE Web Services programming model? (Choose two.)

    A.Stateless session beans can be exposed as Web Services in the Java EE model.B.Web Service communication in the Java EE model only supports asynchronous communication.C.The Service Endpoint Interface (SEI) can follow either the JAX-RPC or JAX-WS rules for WSDL mappings.D.EJB's that are exposed as Web Services run in a restricted container outside of the standard EJB container.E.JAX-WS supports SOAP 1.2 but does NOT support SOAP 1.1.

    Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition

    - Third Edition.

    Options A, C are correct.Option B is incorrect because Web Service communication in the Java EE model supports asynchronous and synchronous communication.Option D is incorrect because EJB's exposed as Web Services run in the same container as all other EJB's.Option E is incorrect because JAX-WS supports both SOAP 1.1 and SOAP 1.2.

    16.The new Dispatch API introduced in JAX-WS supports a fully dynamic service invocation.

    Which statement defines a requirement for a JAX-WS dynamic service?

    A.Only an XML Schema document and knowledge of the body of the message is required to build a client.B.Requires only the WSDL document and knowledge of the header of the message isrequired to build a client.C.No WSDL or XML Schema document or any other knowledge of the message layout isrequired to build a client.D.JAX-WS support for a fully dynamic service invocation requires knowledge of aWSDL and the XML Schema document

    Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition- Third Edition.

    Option C is correct.Options A, B, C are incorrect because you do not need a WSDL or XML schema to build a client.

    17.You are building a real-time Java EE purchase order processing system. This system will integrate with an external system as part of the purchase order approval process. This system will need to validate the account effective date with the external system before a purchase order can complete. The external system is

  • 7/27/2019 Scea Exam Questions 3 Copy

    8/24

  • 7/27/2019 Scea Exam Questions 3 Copy

    9/24

    Options A, C are correct. A required Envelope element that identifies the XML document as a SOAP message, and a required Body element that contains call and response information.Option B is incorrect because a header element that contains header informationis optional.Option D is incorrect because a fault element that provides information about errors that occurred while processing the message is optional.

    20.You need to implement a Java attachments API that will enable developers to produce and consume messages conforming to the SOAP 1.1 specification and SOAP with attachments.

    Which is the correct API to implement?

    A.JAXBB.StAXC.SAAJD.JAXP

    Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition- Third Edition.

    Option C is correct.

    Option A is incorrect because JAXB provides a convenient way to process XML content using Java objects by binding its XML schema to Java representation.Option B is incorrect because StAX is an event-driven, pull-parsing API for reading and writing XML documents.Option D is incorrect because JAXP enables applications to parse and transform XML documents independent of a particular XML processing implementation.

    21.You have been told that you will need to integrate with an Enterprise Information System (EIS) for the next phase of the applications release. You need to access the business logic of Enterprise Information Systems (EIS) in a tightly-coupled way.

    Which two are benefits of using JCA over a custom solution? (Choose two.)

    A.System contracts defined between application server and the EIS resource adapter provides connection pooling.B.The JCA coupling interface is strictly defined through Common Client Interface.C.System contracts and container-component contracts are exposed for the application component.D.An application server can use a transaction manager to manage transactions across a single resource manager.E.With JCA, portability is achieved with any language and interoperability is not limited to a specific target.

    Reference CloseJCA specification 1.5.

    Options A, B are correct.Option C is incorrect because these contracts are hidden for the application component.Option D is incorrect because with a transaction management contract the transaction manager can manage transaction across multiple resources managers.Option E is incorrect because JCA is not truly portable. It is a Java solution and interoperability is limited to a specific target.

  • 7/27/2019 Scea Exam Questions 3 Copy

    10/24

    22.Your application sends three messages with no delivery failures to a JMS destination, where two consumers consume messages from the destination.

    How do both consumers ensure they receive all messages?

    A.Consumers listen to a JMS queue without message selectors.B.Consumers listen to a JMS queue with message selectors.C.Consumers subscribe to a JMS topic with message selectors.D.Consumers subscribe to a JMS topic without message selectors

    Reference CloseJMS specification 1.1.

    Option C is correct.Options A, B are incorrect because consumers subscribe to a JMS topic.Option D is incorrect because consumers subscribe to a JMS topic with message selectors.

    23.Your organization is interested in building an application that will allow users to query and read volumes of statistical data for analysis. They anticipatehigh volumes of traffic and want the most scalable solution. This application wi

    ll be distributed in a cluster and deployed as an enterprise archive. Componentsshould be designed so that they can be accessed remotely by other Java applications.

    What Java EE component type and remote access technology is correct for this architecture?

    A.Servlet accessed using HTTP.B.Message-driven bean accessed using JMS.C.Stateless session bean accessed using RMI.D.Stored procedures and DAO's.Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition- Third Edition.

    Option C is correct.Option A is incorrect because this is not the most scalable solution.Option B is incorrect because this not a workflow application and requires remote accessibility.Option D is incorrect because this is not the most scalable solution.

    24.Your organization is building a Java EE service request system that will require workflow and numerous business rules. This system will need to process large volumes of asynchronous messages and guarantee delivery. The organization itself has gone through several buy-outs and because of this the integration of applications has been implemented in a loosely coupled manner.

    Which combination of technologies is correct for this architecture?

    A.MVC framework and Web Services.B.JMS topic and message-driven bean.C.Stored procedures and DAO's.D.Stateless session bean and RMI

    Reference CloseThe Java EE 5 Tutorial - The Java Series Enterprise Edition

  • 7/27/2019 Scea Exam Questions 3 Copy

    11/24

    - Third Edition.

    Option B is correct.Options A, C, D are incorrect because JMS will allow for messages to be specified as persistent or non-persistent. A persistent message is guaranteed to be delivered at least once. It is not considered sent until it has been safely writtenin the file or database.

    25.Your organization is building a customer relationship management system. Alldata is stored in a relational database system and multiple applications accessthis data using a single persistence layer. The model includes complex relationships between tables. Design requirements will include supporting complex queries, bulk updates/deletes, and disconnected operations.

    Which persistence technology best supports these design requirements?

    A.Java Persistence APIB.CMP entity beanC.BMP entity beanD.BMP with JDBC

    Reference CloseJSR 220 Enterprise 3.0 JavaBeans specification 1.2.

    Option A is correct.Option B is incorrect because CMP does not support disconnected operations and bulk updates/deletes.Option C is incorrect because BMP entity bean contains the calls to access the database.Option D is incorrect because CMP with JDBC does not support disconnected operations and bulk updates/deletes.

    26.Which statement is true about Container Managed Persistence (CMP) and the introduction of Java Persistence API?

    A.It is possible within the same application to combine EJB CMP entity beans wit

    h new EJB's utilizing Java Persistence API.B.You are unable to combine earlier EJB CMP entity beans with newer EJB components utilizing Java Persistence API.C.EJB CMP entity beans API is simpler but provides less features than the Java Persistence API.D.You are required to migrate applications using EJB CMP entity beans to the Java Persistence API.

    Reference CloseJSR 220 Enterprise 3.0 JavaBeans specification 1.2.

    Option A is correct.Option B is incorrect because with Java Persistence API you are able to combine

    earlier EJB CMP entity beans with newer EJB components utilizing Java Persistence API.Option C is incorrect because Java Persistence API is simpler and provides morefeatures.Option D is incorrect because you are not required to migrate applications thatutilize XMP entity beans.

    27.Which two statements are true about implementing Web Services utilizing the Java EE programming model? (Choose two.)

  • 7/27/2019 Scea Exam Questions 3 Copy

    12/24

    A.Supports the processing of XML content, data binding, and the development SOAPbased and RESTful Web Services.B.Web Services exposed by JAX-WS can only be of type document/literal.C.Stateless session beans cannot be exposed as Web Services using Java EE technology.D.JAX-WS greatly simplifies the Web Service implementation model.

    Reference CloseJava API for XML-Based Web Services (JAX-WS) 1.3.

    Options A, D are correct.Option B is incorrect because a WSDL SOAP binding can be either a remote procedure call (RPC) style binding or a document style binding. A SOAP binding can alsohave an encoded use or a literal use.Option C is incorrect because a stateless session bean can be exposed as a Web Service.

    28.JAX-WS describes the WSDL to Java mappings.

    How does JAXB correlate XML schemas to Java objects?

    A.Through annotations.

    B.Through data binding.C.Using registration and discovery of services.D.Write callback methods

    Reference CloseJava API for XML-Based Web Services (JAX-WS) 1.3.

    Option B is correct.Option A is incorrect because you cannot bind XML schema to Java representationusing annotations.Option C is incorrect because that is the responsibility of JAXR.Option D is incorrect because JAXB allows Java developers to access and process

    XML data without having to know XML or XML processing. For example, there is noneed to create or use a SAX parser or write callback methods.

    29.The new EJB 3.0 architecture has simplified development over the previous generations and has provided new functionality.

    Which two statements are true about the new EJB 3.0 architecture? (Choose two.)

    A.Simplification of the enterprise bean types.B.An interceptor facility for session beans and message-driven beans.C.Increased requirements for usage of checked exceptions.D.Elimination of the majority of required interfaces for persistent entities.

    E.Expanding of the requirement for home interfaces for session beans

    Reference CloseJSR 220 Enterprise 3.0 JavaBeans specification 1.2.

    Options A, B are correct.Option C is incorrect because there is a reduction of usage.Option D is incorrect because there is an elimination of all required interfaces.Option E is incorrect because there is a reduction of the requirements for home

  • 7/27/2019 Scea Exam Questions 3 Copy

    13/24

    interfaces.

    30.EJB 2.1 and earlier API's allowed for remote client access of session beans differently than EJB 3.0. EJB 3.0 introduces a new way to access the session beanremotely.

    Which statement describes the new way a session bean can be accessed remotely using EJB 3.0?

    A.A remote client accesses a session bean through the bean's remote home interface.B.A remote client accesses a session bean through the bean's remote component interface.C.A remote client accesses a session bean through the bean's remote business interface.D.A remote client accesses a session bean through the bean's remote assembler interface

    Reference CloseJSR 220 Enterprise 3.0 JavaBeans specification 3.2.

    Option C is correct option.Option D is incorrect; there is no remote assembler interface.Options B, A are not new but still available under the new EJB 3.0 specification

    .

    31.An online music sales company is creating a new website with dynamic content.The company has several web designers with HTML and some scripting experience,but no real programming experience. You are a consultant architecting the back-end solution.What three technologies would you recommend they use for their dynamic content? (Choose three.)

    A.JSPB.JCEC.JSFD.Custom JSF Components

    E.Custom Tag LibrariesF.Expression Language

    Reference CloseJSP 2.0 spec, JSF 1.2 spec.

    Options A, C, F are correct.Option B is incorrect because encryption is not indicated by the requirements.Options D, E are incorrect because they require Java knowledge.

    32.Your organizations new website will be implemented in JSF.

    What challenge will the graphic artists designing the site have with a standard

    HTML editor?

    A.JSF tags cannot be put into HTML.B.Special JSF Javascript will need to be written.C.Standard HTML editors will not render the JSF accurately.D.JSF does not scale well in HTML editors.E.The AWT component libraries are becoming unpopular

    Reference CloseJSF 1.2 spec.

  • 7/27/2019 Scea Exam Questions 3 Copy

    14/24

    Option C is correct. You must deploy the application to accurately see the JSF rendered.Option A is incorrect because it is false.Options B, D are incorrect because they are not accurate statements.Option E is incorrect because it is not relevant.

    33.Your organization has developed a new J2EE Invoicing system, and during loadtesting the system runs slow, but CPU and memory utilization remain low. To savetime they embedded all the business logic into the JSPs as scriptlets.

    What could be a cause of the problem?

    A.You need to scale your application horizontally.B.You need to scale your application vertically.C.Servlet instances are getting locked for every request.D.You are dropping database connections.E.Your load balancer needs to be re-polarized.

    Reference CloseServlet 2.4 spec.

    Option C is correct because the default behavior for JSPs is for the service method to be synchronized in the resulting servlet.

    Options A, B are incorrect because the load is low.Option D is incorrect because the question does not state that the logs indicateconnections are being dropped.Option E is incorrect because it is not a valid answer.

    34.Your organization is designing a new application to track the materials usedby a construction firm. They have decided to use Servlets in their architecture.

    What are two appropriate uses for Servlets in a J2EE application? (Choose two.)

    A.Contains HTML code for view.

    B.Can obtain session information.C.Sets request information.D.Invokes business services.E.Sets transport guarantee.

    Reference CloseServlet 2.4 Spec.

    Options B, D are correct.Option A is incorrect because HTML code should not be hard-coded in the Servlet.Option C is incorrect because the Servlet receives the request information.Option E is incorrect because the transport guarantee is set in the deployment d

    escriptor.

    35.Your organizations new accounting system uses Java Server Faces for their GUI. You have been hired to develop screens for the system.Which three are the steps of the JSF request lifecycle? (Choose three.)

    A.Process ValidationsB.Passivated State

  • 7/27/2019 Scea Exam Questions 3 Copy

    15/24

    C.Restore viewD.Does not existE.Ready StateF.Apply Request Values

    Reference CloseJSF 1.2 spec.

    Options A, C, F are correct.Options B, D, E are incorrect because these are the stages of a stateful sessionbean.

    36.You are developing a new cost estimation tool that will be deployed on your companies Intranet. Your application has been designed using Java Server Faces.

    What are the three steps of the JSF response lifecycle? (Choose three.)

    A.Invoke applicationB.ManagedC.DetachedD.Update model valuesE.Render Response

    F.Removed

    Reference CloseJSF 1.2 spec.jsf-1_2-fr-spec.pdf, pg. 57.

    Options A, D, E are correct.Options B, C, F are incorrect because these are stages of the EJB3 entity.

    37.You work for a financial services company that allows investment advisors tocreate proposed portfolios for customers. The system is mostly used to display large amounts of existing stock and fund data from a database, but there is some

    data saved into the system for each client. The usage of the system is fairly low.

    What two technologies would you choose for the system? (Choose two.)

    A.UDDIB.Stateful Session BeansC.Pojo's implementing DAO patternD.JavaServer PagesE.Web Service Broker

    Reference CloseJSP 2.0 specs.

    Core J2EE Patterns Second Edition: (Alur, Crupi, Malks).

    Options C, D are correct.Option A is incorrect because there is no requirement for UDDI.Option B is incorrect because usage is low and there are few transactions, so EJBs are not indicated.Option E is incorrect because it is not indicated by requirements.

    38.You are architecting a real-time system with high usage and high volumes of t

  • 7/27/2019 Scea Exam Questions 3 Copy

    16/24

    ransactions. You need an MVC application with quick presentation times resembling a thin client and will have several pre-populated views that can carry acrossseveral pages. The users must be able to quickly navigate between different sections of the system.

    Which three technologies will you need to implement? (Choose three.)

    A.MDBB.Swing GUI controlsC.JSPD.EJB3 EntitiesE.Stateless Session BeansF.JCE

    Reference CloseEJB3 specs.JSP 2.0 specs.

    Options C, D, E are correct.Option A is incorrect because it is a real-time system, and MDBs are asynchronous.Option B is incorrect because swing components are notoriously slow.Option F is incorrect because nothing is mentioned about security requirements.

    39.You are architecting a new web deployed portfolio management application. Inthe current system, the Portfolio Managers have a desktop application running on their local PCs, and you want to implement the new solution with a GUI that issimilar to their desktop application. Once the users have set up and approved aportfolio, you must use a Web service to send the trade to a fund trading system.

    What two technologies are required for this new application? (Choose two.)

    A.JAX-WSB.JMSC.JSSE

    D.JCEE.JSPF.JSF

    Reference CloseJSF 1.2 spec.

    Options A, F are correct.Options B, C, D are incorrect because they are not indicated by the requirements.Option E is incorrect because it could be used, but only by adding Ajax, which is not mentioned in the requirements.

    40.You are writing a utility that searches for existing web services provided bylarge companies. 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 nicely formatted html page.

    Which two technologies would you use for this application? (Choose two.)

    A.JAX-WSB.JAX-RPC

  • 7/27/2019 Scea Exam Questions 3 Copy

    17/24

    C.JAXBD.JAXRE.JSPF.JSF

    Reference CloseJ2EE Web Services: XML SOAP WSDL UDDI WS-I JAX-RPC JAXR SAAJ JAXP (Paperback) by Richard Monson-Haefel.JSF 1.2 specs.

    Options D, F are correct.Options A, B, C, E are incorrect because they don't address the requirements.

    41.You will be replacing an aging IT infrastructure, but they do not have the resources to replace all their legacy systems at once. They have a variety of mainframe applications, client server applications, and standalone programs that need to be integrated.

    Which will provide a unified platform for scalable, secure SOA development?

    A.JAXBB.JAXRC.Enterprise Service Bus

    D.Simple Object Access ProtocolE.REST

    Reference Closehttp://www.sun.com/software/javaenterprisesystem/javacaps/index.jsp

    Option C is correct.Options A, B, D, E are incorrect because they do not satisfy the requirements.

    42.You need to process DOM documents received through Web Service from your suppliers.

    What will you need to implement to be able to process these DOM documents?

    A.UDDIB.JAXRC.JAXPD.JSSEE.JCE

    Reference CloseJ2EE Web Services: XML SOAP WSDL UDDI WS-I JAX-RPC JAXR SAAJ JAXP (Paperback)by Richard Monson-Haefel.

    Option C is correct.Options A, B are incorrect because Web Service registries are not indicated in the requirements.Option D is incorrect because secure sockets are not indicated.Option E is incorrect because encryption is not directly indicated in the requirements.

    43.You have been hired to re-factor an existing legacy application that is difficult to extend. The business group is constantly asking for changes to the GUI f

  • 7/27/2019 Scea Exam Questions 3 Copy

    18/24

    or different presentations and different customers, but the business logic remains the same. You are surprised the engineers have so much difficulty presentingdifferent views of the same logic.

    What is the most likely cause of the difficulty and the resolution?

    A.HTML tags are replicated in many pages. Re-factor the code using the View Helper pattern.B.Database connectivity is unreliable. Expand the number of connections in the connection pool.C.Business logic is embedded in the JSPs. Re-factor the code to use business object design pattern.D.Network connections are slow. Re-factor the code using the Transfer Object pattern

    Reference CloseCore J2EE Patterns Second Edition: (Alur, Crupi, Malks).

    Option C is correct.Option A is incorrect because it does not solve the problem.Option B is incorrect because it is unrelated to the extensibility problem.Option D is incorrect because it is unrelated to the extensibility problem.

    44.You have been asked to look at an application with performance problems. At first glance the code looks appropriate and the configuration seems ok, but the CPU and memory on the server are routinely maxing out due to high usage.

    What relatively quick and cost-effective changes can you recommend to improve the system performance?

    A.Switch to High-Availability servers.B.Re-factor to use design patterns.C.Vertical Scaling of the system.D.Horizontal Scaling of the system.

    Reference ClosePractical Software Estimation: (M. A. Parthasarathy).

    Option C is correct.Option A is incorrect because purchasing new servers is costly.Option B is incorrect because the code already looks good.Option D is incorrect because purchasing new servers is costly.

    45.Version 1.0 of your software had lots of dynamic SQL embedded in the businesslogic, causing your code to be difficult to maintain. In version 2.0 you want to encapsulate access to the data source, and provide easy migration to differentvendor products.

    What design pattern should you implement to address these specific concerns when

    re-factoring your code?

    A.Business DelegateB.Service to WorkerC.Transfer ObjectD.DAOE.Business Object

    Reference CloseCore J2EE Patterns Second Edition: (Alur, Crupi, Malks).

  • 7/27/2019 Scea Exam Questions 3 Copy

    19/24

    Option D is correct.Option A is incorrect because business delegates should not contain SQL.Option B is incorrect because it does not address the requirements.Option C is incorrect because TO's should not contain SQL, though they may be used by the DAO.Option E is incorrect because the Business Object should not directly contain the db access logic.

    46.Your existing application uses multiple JSP pages for display. The visual isdefined using static template text, markup tags, EL, JSTL and CSS. You want to avoid embedding scriptlet code in your views as much as possible.

    What pattern is an example of creating custom tags to handle processing in yourviews?

    A.Composite EntityB.View HelperC.Dispatcher ViewD.Service to WorkerE.Composite View

    Reference CloseCore J2EE Patterns Second Edition: (Alur, Crupi, Malks).

    Option B is correct.

    Option A is incorrect because that deals with the Model.Option C is incorrect because it does not address the requirements.Option D is incorrect because it does not address the requirements.Option E is incorrect because it does not deal with processing in the views, which is the question.

    47.You are creating a utility billing system that you want to sell to as many different utility companies as possible. You want each company to have their own billing module, reporting module, and historical reporting module that are specific to each utility and each module in the system is related to one another, butyou do not want to have lots of conditional statements in your code.

    Which is the correct design pattern to avoid having lots of conditional statements?

    A.BuilderB.Factory MethodC.SingletonD.Abstract FactoryE.PrototypeF.Facade

    Reference CloseDesign Patterns: Elements of Reusable Object-Oriented Software.

    Option D is correct.Option A is incorrect because Builder separates the construction of a complex object from its representation so that the same construction process can create different representations.Option B is a similar pattern, but it is incorrect because we want families of related objects that are related to each other.Option C is incorrect because we do not want to control the number of instances.Option E is incorrect because it is used when the inherent cost of creating a ne

  • 7/27/2019 Scea Exam Questions 3 Copy

    20/24

    w object in the standard way (e.g., using the 'new' keyword) is prohibitively expensive for a given applicationOption F is incorrect because Facade creates a simplified interface of an existing interface

    48.You are implementing a new custom payroll system, which will contain employees who may be paid either salaried, part time (with partial benefits) or straighthourly. The management of the company has told you that other types of pay calculations may be implemented in version 2.0 of your software. You want for each Employee object to contain a routine to compute the pay, but this calculation will vary from employee to employee, and should be interchangeable. Since other paycalculations are coming, you want to avoid hard coded logic in your main processing routines. Other than pay calculations, employees are handled in the same way in your system, so you want to avoid different Employee sub-classes.

    Which design pattern will you need to implement to avoid these different Employee sub-classes?

    A.BridgeB.StrategyC.TemplateD.VisitorE.Abstract Factory

    F.Factory Method

    Reference CloseDesign Patterns: Elements of Reusable Object-Oriented Software.

    Option B is correct.Option A is incorrect because Bridge decouples an abstraction from its implementation so that the two can vary independently.Option C is incorrect because Template describes the program skeleton of a program.Option D is incorrect because Visitor is a way to traverse a group of differing

    objects and execute distinct operations.Option E is incorrect because Abstract Factory creates families of related objects.Option F is incorrect because you want to avoid different Employee sub-classes.

    49.What are two benefits of the Factory Method pattern? (Choose two.)

    A.Decouple an abstraction from its implementation.B.Lets subclasses decide which class to instantiate.C.Define an interface for creating families of related objects.D.Provide a unified interface to a set of interfaces.

    E.Define an interface for creating an object.

    Reference CloseDesign Patterns: Elements of Reusable Object-Oriented Software.Gang of Four - pg 107, 151, 87, 185.

    Options B, E are correct.Option A is incorrect because decouple an abstraction from its implementation isa Bridge pattern.

  • 7/27/2019 Scea Exam Questions 3 Copy

    21/24

    Option C is incorrect because define an interface for creating families of related objects is an Abstract Factory pattern.Option D is incorrect because provide a unified interface to a set of interfacesis a Facade pattern.

    50.What are two benefits of the Template design pattern? (Choose two.)

    A.Redefine certain steps of an algorithm without changing its structure.B.Configure a class with one of many behaviors.C.Allow an object to alter its behavior when its internal state changes.D.Define a skeleton of an algorithm.E.Define a one-to-many dependency between objects

    Reference CloseDesign Patterns: Elements of Reusable Object-Oriented Software.Gang of Four - pg 325, 316, 305.

    Options A, D are correct.Option B is incorrect because configure a class with one of many behaviors is aStrategy pattern.Option C is incorrect because allow an object to alter its behavior when its internal state changes is State.

    Option E is incorrect because define a one-to-many dependency between objects isObserver pattern.

    51.What are three benefits of adding the Business Delegate pattern to your architecture? (Choose three.)

    A.Cache results and references to remote business services.B.Server-side abstraction.C.Avoid unnecessary invocation of remote services.D.Handles exceptions from the business services.E.You want to avoid duplicating sub views.

    Core J2EE Patterns Second Edition: (Alur, Crupi, Malks).

    Options A, C, D are correct.Option B is incorrect because it is a CLIENT side abstraction.Option E is incorrect because that is Composite View.

    52.What are three benefits of using the Service Locator pattern? (Choose three.)

    A.Centralize and reuse the implementation of lookups.B.You want to implement parent-child relationships efficiently when implementingBusiness Objects as entity beans.

    C.You want to reduce remote requests across the network.D.Reestablish connections to previously accessed EJB instances.E.Encapsulate vendor dependencies for registry implementations.F.You want to maintain the search results on the server side

    Reference CloseCore J2EE Patterns Second Edition: (Alur, Crupi, Malks).

    Options A, D, E are correct.Option B is incorrect because that is Composite Entity.

  • 7/27/2019 Scea Exam Questions 3 Copy

    22/24

    Option C is incorrect because that is Transfer Object.Option F is incorrect because that is Value List Handler.

    53.A company is trying to cause chaos by sending out an unsigned applet that isloaded via the net.

    What action can the applet take to cause untold destruction?

    A.Access file directories on the local machine.B.Access load libraries on the local machine.C.Make network connections to another web server.D.Use excessive amounts of CPU time.

    Reference Closehttp://java.sun.com/sfaq/

    Option D is correct.Options A, B, C are incorrect because they are prevented by the sandbox.

    54.The application you are using has loaded into your browser Java applets in anun-trusted jar file.

    What can these un-trusted jar files do?

    A.Access any system properties.B.Access specific system properties.C.Read arbitrary files on the client.D.Write arbitrary files on the client.

    Reference Closehttp://java.sun.com/sfaq/

    Option B is correct.Option A is incorrect because there are only ten system properties that cannot be hidden from applets loaded into a Java-enabled browser, such as Java version.Option C is incorrect because the sandbox prevents it.Option D is incorrect because the sandbox prevents it.

    55.Your organization is going through an extensive security audit and it has been discovered that their Internet-facing web site is vulnerable to Cross Site Scripting from authenticated users.

    What are appropriate places for mitigating these threats?

    A.Requiring SSL in the deployment descriptor transport guarantee.B.Custom JavaScript in your JSP pages.C.Adding an Intercepting Validation filter to your system.D.In the report used to display the data.E.Use security roles in the deployment descriptor

    Reference CloseCore Security Patterns: Best Practices and Strategies (Christopher Steel; Ramesh Nagappan; Ray Lai): Intercepting Validtor.

    Option C is correct.Options A, E are incorrect because they are authenticated users.Option B is incorrect because validation should be done on the server, not script in the browser.Option D is incorrect because you would want to filter the characters before displaying it.

  • 7/27/2019 Scea Exam Questions 3 Copy

    23/24

    56.You need to control access to sensitive URLs in your web site.

    What option below allows you to impose security and control access to sensitiveURLs?

    A.Deployment descriptorB.Custom JavaScript in JSPC.EJB EntityD.In stored proceduresE.A custom tag library

    Reference CloseServlet specs 1.4.

    Option A is correct.Option B is incorrect because you need to authorize access before you reach thescreen.Option C is incorrect because the EJB Entity is in the Model (not Controller).Option D is incorrect because the stored proc is in the Model (not Controller).Option E is incorrect because a custom tag library should not be used for security.

    57.You are architecting an online music sales application for Flash and Sizzle,Inc. that accepts customer feedback. Users can rank purchases from one to five by clicking on buttons, as well as input comments about the product into a text box.

    What can filtering special characters such as "; ? -- | " from text boxes on JSPforms prevent?

    A.Buffer OverflowB.SQL InjectionC.Authorization ErrorsD.Weird output on reports

    Reference CloseCore Security Patterns: Best Practices and Strategies (Christopher Steel; Ramesh Nagappan; Ray Lai).

    Option B is correct.Options A, C, D are incorrect because they do not address the problem

    58.The requirements for this new website states that a new system must use encryption to prevent data theft. Passwords must be tored using a one-way encryptionalgorithm so that they can never be accidentally displayed.

    What encryption method will you implement?

    A.Passwords can be stored using 3DES.B.Passwords can be stored using SHA.C.Passwords can be stored using Blowfish.D.RSA

    Reference CloseCore Security Patterns: Best Practices and Strategies (Christopher Steel; Ramesh Nagappan; Ray Lai).

    Option B is correct.

  • 7/27/2019 Scea Exam Questions 3 Copy

    24/24

    Option A is incorrect because it is a symmetrical encryption algorithm.Option C is incorrect because it is a symmetrical encryption algorithm.Option D is incorrect because it is a asymmetrical encryption algorithm.

    59.You are developing a new J2EE application and you want to restrict access toparts of the system for security purposes.

    Which security constraints can be specified in the web.xml deployment descriptor?

    A.Restrictions based on user login.B.Restriction on Struts actions.C.Restrictions on encryption methods.D.Restriction based on Role Name.

    Reference CloseServlet 2.4 spec.

    Option D is correct.Option A is incorrect because this is vendor specific.Option B is incorrect because this is handled in different .xml files.Option C is incorrect because you can only specify a transport guarantee. The browser and ssl server determine the protocol.

    Option D is correct.

    60.You have decided your company's new Internet application will use Java Authentication and Authorization Service for security.Which is a security benefit of using Java Authentication and Authorization?

    A.It provides Pluggable Authentication Modules.B.It provides JSAPI support.C.It provides secure internet connections via sockets.D.It provides a framework for SOA governance

    Reference Closehttp://java.sun.com/javase/6/docs/technotes/guides/security/jaas/JAASRefGuide.html

    Option A is correct.Option B is incorrect because JSAPI is the Java Speech API.Option C is incorrect because that is Java Secure Socket Extension.Option D is incorrect because that is not related to JAAS.

    --