Free Oracle 1z0-900 Exam Questions (page: 3)

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

  1. MDBs can participate in transactions.
  2. MDBs are invoked synchronously.
  3. Each MDBs can process messages only from a single client.
  4. MDBs retain data caches between client calls.

Answer(s): A


Reference:

https://docs.oracle.com/javaee/7/tutorial/ejb-intro003.htm



You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales?

  1. in the <f:view> tag of the Facelet page
  2. in the web.xml file
  3. in the faces-config.xml file
  4. in the src folder

Answer(s): A



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?

  1. @Observes(notifyObserver=IF_EXISTS) on line 3 and line 6
  2. @Observes(during=IN_PROGRESS) on line 1
  3. @Observes(during=AFTER_COMPLETION) on line 1
  4. @Observes(notifyObserver=IF_EXISTS) on line 4 and line 7 before method parameter declaration

Answer(s): A


Reference:

https://docs.oracle.com/javaee/7/tutorial/cdi-adv005.htm



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

  1. <%= exception.message %>
  2. <c:out value=”${requestScope[‘javax.servlet.error.exception’]}”/>
  3. <% exception.getMessage(); %>
  4. <% System.out.println(e.getMessage()) %>

Answer(s): D


Reference:

https://www.geeksforgeeks.org/3-different-ways-print-exception-messages-java/






Post your Comments and Discuss Oracle 1z0-900 exam prep with other Community members:

1z0-900 Exam Discussions & Posts