1z0-900

1z0-900 practice questions, page 3 of 6, with answer review and explanations.

Question 11

Given the code fragment: Which method should be used on line 3 to enable default validation mechanism?

  1. u.setProperty(String, Object)
  2. u.setProperty(Schema)
  3. u.setEventHandler(ValidationEventHandler)
  4. u.setAdapter(XmlAdapter)

Question 12

How do you specify a default error page in your web.xml file?

  1. <on-error> <location>/general-error.html<location> </on-error>
  2. <error-page> <error-code>*</error-code> <location>/general-error.html</location> </error-page>
  3. <on-error> <error-code>*</error-code> <location>/general-error.html</location> </on-error>
  4. <error-page> <location>/general-error.html</location> </error-page>

Question 13

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.)

  1. Replace line 2 with: @Inject public void setAcc(Account acc)
  2. Replace line 3 with: @Inject public Account getAcc()
  3. Replace line 1 with: @Inject private Account acc;
  4. Replace line 3 with: public @Inject Account getAcc()
  5. Replace line 1 with: private @Inject Account acc;
  6. Replace line 2 with: public void setAcc(@Inject Account acc)

Question 14

Given: How often does the submitted task run?

  1. need more details to determine
  2. once
  3. as many times as you like
  4. based on a schedule

Question 15

Given: What code needs to be added to line 1 for MyMapper bean instances to be correctly passivated?

  1. @Stateless @PassivationCapable
  2. @Stateless
  3. @Stateful @PassivationCapable
  4. @Stateful