Exit demo 1Z0-900 Java EE 7 Application Developer PDF format · free preview

Oracle 1Z0-900 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/1z0-900.html

Question 1
Single choice

You need to develop a chat application, which allows the display of emoticons and images together with text messages.

How should you configure a WebSocket endpoints to receive both text and binary messages?

A.

Create two @onMessage methods in the same endpoint with appropriate parameter types.

B.

Define the @onMessage methods in your endpoint with Object as parameter and check the actual type in your code.

C.

You can achieve this only by creating separate WebSocket endpoints for each message type.

D.

Create two @onMessage methods, each with appropriate decoder attribute in the same endpoint.

Question 2
Multiple choice

Which two capabilities are provided by the Java Authentication and Authorization Services (JAAS) API? (Choose two.)

A.

protecting data from unauthorized viewing by using encryption

B.

verifying that a user is allowed to perform an action

C.

ensuring that data is not modified in transit

D.

verifying identity claims from users

Question 3
Single choice

Which interface should you implement if you want to be alerted to the lifecycle events surrounding your task being executed by a ManagedExecutorService?

A.

the Runnable Interface

B.

the ManagedExecutorTask interface

C.

the TaskEventListener interface

D.

the ManagedTaskListener interface

Question 4
Single choice

Given the code fragment:

Which URL triggers the invocation of the getEmployee () method?

A.

<base url>/Employees/89724

B.

<base url>/Employees/J6349

C.

<base url>/Employees/id:a7280

D.

<base url>/Employees/id/J6349

Question 5
Single choice

What is true about Message-Driven Beans (MDBs)?

A.

MDBs can participate in transactions.

B.

MDBs are invoked synchronously.

C.

Each MDBs can process messages only from a single client.

D.

MDBs retain data caches between client calls.

Question 6
Single choice

You have been asked to implement internationalization in your JSF web application.

Where do you configure the supported locales?

A.

in the <f:view> tag of the Facelet page

B.

in the web.xml file

C.

in the faces-config.xml file

D.

in the src folder

Question 7
Single choice

Given the code fragment:

Which code can be added to register both of these methods to receive BankEvent notifications only if an instance of BankActivityService is already instantiated in the current context?

A.

@Observes(notifyObserver=IF_EXISTS) on line 3 and line 6

B.

@Observes(during=IN_PROGRESS) on line 1

C.

@Observes(during=AFTER_COMPLETION) on line 1

D.

@Observes(notifyObserver=IF_EXISTS) on line 4 and line 7 before method parameter declaration

Question 8
Single choice

Which code snippet prints the exception error message as part of the page output?

A.

<%= exception.message %>

B.

<c:out value="${requestScope[`javax.servlet.error.exception']}"/>

C.

<% exception.getMessage(); %>

D.

<% System.out.println(e.getMessage()) %>

Question 9
Multiple choice

Java EE's support for WS-Security includes handling which two types of security credentials? (Choose two.)

A.

X.509 certificates

B.

SAML tokens

C.

OAuth Bearer tokens

D.

Two-factor authentication tokens

Question 10
Multiple choice

Given the code fragment from a Facelet page:

On Line 1, you ae asked to insert a search box that displays the text "Search Here" via a placeholder.
Assume searchMB is a valid Managed Bean.

Which two options enable you to create a search box with a placeholder attribute on Line 1? (Choose two.)

A.

<h:inputText value="#(searchMB.query)">
<f:param name="placeholder" value="Search Here"/>
</h:inputText>

B.

<h:inputText value="#(searchMB.query)" placeholder="Search here"/>

C.

<input jsf:id="search" placeholder="Search here" jsf:value="# (searchMB.query)"></input>

D.

<h:inputText pt:placeholder="Search Here" value="#(searchMB.query)"/>

E.

<input id="search" jsf:placeholder="Search Here" value="$(searchMB.query)"></input>

Showing 10 of 142 questions · Unlock the full set