Oracle

1z0-900 practice test

Practice with 15 free Testara sample questions, or choose paid access to the full 32-question bank.

Provider
Oracle
Question bank
32
Free sample
15 questions
Publisher
Testara

About this practice material

This page covers Testara's practice question bank for 1z0-900, a certification listed under Oracle. Questions use original, exam-style scenarios and are not questions from the official certification exam.

Testara is an independent practice platform and is not affiliated with, endorsed by, or authorized by Oracle. The certification credential is issued by Oracle, not Testara. Certification and provider names belong to their respective owners.

Start practicing

The guest demo does not save an attempt. Sign in before buying access.

Try 15 questions free

Available without signing in

Free sample questions

These 15 questions and their explanations are server-rendered so you can inspect the material before opening the interactive demo.

  1. Question 1 · 1

    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?

    Choose one answer.

    • Create two @onMessage methods in the same endpoint with appropriate parameter types.
    • Define the @onMessage methods in your endpoint with Object as parameter and check the actual type in your code.
    • You can achieve this only by creating separate WebSocket endpoints for each message type.
    • Create two @onMessage methods, each with appropriate decoder attribute in the same endpoint.
  2. Question 2 · 1

    Given the code fragment: And - Which two steps, when performed independently, enable the index.xhtml page to print the following text: The Id is 12345? (Choose two.)

    Choose all answers that apply.

    Question illustration 1
    Question illustration 2
    • Replace line 2 with: @Inject public void setAcc(Account acc)
    • Replace line 3 with: @Inject public Account getAcc()
    • Replace line 1 with: @Inject private Account acc;
    • Replace line 3 with: public @Inject Account getAcc()
    • Replace line 1 with: private @Inject Account acc;
    • Replace line 2 with: public void setAcc(@Inject Account acc)
  3. Question 3 · 1

    Given: How often does the submitted task run?

    Choose one answer.

    Question illustration 1
    • need more details to determine
    • once
    • as many times as you like
    • based on a schedule
  4. Question 4 · 1

    Given: If an exception is thrown inside the if block, what effect will it have on the transaction?

    Choose one answer.

    Question illustration 1
    • The transaction will be committed.
    • The transaction will be suspended.
    • The transaction will be rolled back.
  5. Question 5 · 1

    Given the code fragments: What code should you add to the body of the updateEmployee method in order to save pending changes to the database?

    Choose one answer.

    Question illustration 1
    • entityManager.merge(emp);
    • Context. Ctx = new InitialContext(); UserTransaction utx = (UserTransaction)ctx.lookup("java:comp/UserTransaction"); utx.begin(); entityManager.merge(emp); utx.commit();
    • entityManager.lock(emp); EntityManager.merge(emp);
    • entityManager.getTransaction().begin(); entityManager.merge(emp); entityManager.getTransaction().commit();
  6. Question 6 · 1

    When handling a JSF request, your application code decided to redirect the call to another URL by using HTTP redirect. Which action should you take to correctly complete the handling of the JSF life cycle?

    Choose one answer.

    • Set the immediate="true" attribute on the command button that was used to perform this call.
    • Invoke the dispatch() method on the ExternalContext object.
    • Invoke the setCurrentPhaseId(RENDER_RESPONSE) method on the FacesContext object.
    • Invoke the responseComplete() method on the FacesContext object.
  7. Question 7 · 1

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

    Choose all answers that apply.

    • protecting data from unauthorized viewing by using encryption
    • verifying that a user is allowed to perform an action
    • ensuring that data is not modified in transit
    • verifying identity claims from users
  8. Question 8 · 1

    Given the code fragments: Which action completes this composite primary key implementation?

    Choose one answer.

    Question illustration 1
    • Add @IdClass annotation at line 1.
    • Add @Embeddable annotation at line 1 and replace both @Id annotations with @EmbeddedId annotations.
    • Add @IdClass(ContactId.class) annotation at line 2.
    • Add @Embeddable annotation at line 1 and @EmbeddedId(ContactId.class) at line 2.
  9. Question 9 · 1

    Given the code fragment: How can you apply DateConverter to the birthday field?

    Choose one answer.

    Question illustration 1
    • by adding @Convert(to=Date.class) at line 3
    • by invoking the setConverter(DateConverter.class) method on the EntityManager object
    • by adding @Converter(autoApply=true) at line 1
    • by adding @Convert((DateConverter.class)) at line 2
  10. Question 10 · 1

    Given: Which client-side Java method will send the employee object to the WebSocket Server Endpoint?

    Choose one answer.

    Question illustration 1
    • session.post(employee);
    • container.send(employee);
    • session.send(employee);
    • remote.sendObject(employee);
  11. Question 11 · 1

    Which two statements are true about the relationship between JavaServer Pages (JSP) and servlets? (Choose two.)

    Choose all answers that apply.

    • A JSP page must extend the HTTPServlet class to behave like a servlet.
    • A JSP page has access to the same information, objects, and a context as a servlet.
    • A JSP page is interpreted by JSPServlet.
    • A JSP page must be written as either an XML file or a JSP file before it is turned into a servlet.
  12. Question 12 · 1

    Given the code sample: And: And: And the next fragment from beans.xml: And this injection point: @Inject GenericMessenger messageHandler; Which type would be injected at run time and referenced by the messageHandler variable?

    Choose one answer.

    Question illustration 1
    Question illustration 2
    Question illustration 3
    Question illustration 4
    • SmsHandler
    • MsgHandler
    • None of the above. An exception would be thrown due to ambiguous bean references.
    • GenericMessenger
  13. Question 13 · 1

    On your JSF page, you have a form in which you have a command button: A user submits the form by clicking the button, and no errors occur while processing the request. Which statement is true?

    Choose one answer.

    Question illustration 1
    • The actNow() and ListenCarefully() methods are executed in parallel.
    • The listenCarefully() method is executed followed by the actNow() method.
    • The actNow() method controls the condition upon which the listenCarefully() method is allowed to be executed.
    • The actNow method is executed followed by the listenCarefully() method.
  14. Question 14 · 1

    Given a JSL document describing a batch job: How do you initiate a batch job?

    Choose one answer.

    Question illustration 1
    • Get the JobExecution object from BatchRuntime and call its start() method.
    • Get the JobExecution object from BatchRuntime and set its status to JobStatus.INITIATED.
    • Get the JobOperator object from BatchRuntime and call its start() method.
    • Call BatchRunTime.initialize("ProductLoadJob");
  15. Question 15 · 1

    How can you configure, in a portable way, the number of threads used by a ManagedExecutorService?

    Choose one answer.

    • programmatically, using a ManagedExecutorService
    • using the ManagedExecutors utility class to define the execution properties
    • This cannot be done because this configuration is dependent on the Java EE Product Provider.
    • configuring the thread pool info in the deployment descriptor

Each purchase applies to this certification. Prices are one-time payments, not monthly subscriptions.

Starter

$29 USD one time

Full access to one certification's question bank in standard practice mode for 60 days.

  • Full question bank for one certification
  • 60 days of access
  • Standard practice mode
  • Question notes and community discussions
  • Attempt scores and answer review

Professional

$49 USD one time

Full access to one certification's question bank, custom test controls and advanced analytics for 60 days.

  • Custom test builder
  • Timers and question selection
  • Randomized question and answer order
  • Advanced performance and weak-question analytics
  • Priority customer support
Try 15 questions free