Java EE 7 Application Developer

Here you have the best Oracle 1z0-900 practice exam questions

  • You have 63 total questions to study from
  • Each page has 5 questions, making a total of 13 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 15, 2024
Question 1 of 63

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?

    Correct Answer: D

    To configure a WebSocket endpoint to receive both text and binary messages, you should create two @onMessage methods, each with appropriate decoder attributes in the same endpoint. This allows the endpoint to handle both types of messages correctly by specifying how each type should be decoded, thereby ensuring proper handling of both text and binary data.

Question 2 of 63

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

    Correct Answer: B, D

    The Java Authentication and Authorization Services (JAAS) API provides capabilities for verifying that a user is allowed to perform an action and for verifying identity claims from users. These are essential aspects of authentication (verifying identity claims) and authorization (determining permissions to perform actions). Encryption and ensuring data integrity are not primary functions of JAAS.

Question 3 of 63

Given the code fragment:

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

    Correct Answer: B

    The `@Path` annotation in the given code fragment specifies that the path must match the pattern "{id:[A-Z][0-9]+}". This means the URL must contain an 'id' value that starts with an uppercase letter followed by one or more digits. Therefore, the correct URL that triggers the invocation of the getEmployee() method is <base url>/Employees/J6349, making option B correct.

Question 4 of 63

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

    Correct Answer: A

    Message-Driven Beans (MDBs) can indeed participate in transactions. They are designed to handle messages asynchronously and can be part of a transaction, ensuring that the procedure either completes successfully or fails entirely, maintaining data integrity. Other options are incorrect as MDBs are invoked asynchronously (not synchronously), can handle messages from multiple clients (not just one), and do not retain data caches between client calls.

Question 5 of 63

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

Where do you configure the supported locales?

    Correct Answer: C

    To implement internationalization in a JSF web application, the configuration of supported locales is done in the faces-config.xml file. This file is part of the JSF standard for application configuration and allows developers to define various settings, including locale configurations. The <f:view> tag can be used within Facelet pages to set the locale, but the configuration of supported locales is primarily designated in faces-config.xml.