nerdexam
Oracle

1Z0-895 · Question #80

Assume an EJB application is comprised of the following EJB fragment: You have been asked to convert the type of InventoryReportBean into a singleton session bean. How would you achieve this task?…

The correct answer is D. Create an ejb-jar.xml file, and override the annotation configuration information asin exhibit D above. Note the line with <override-type>

Session Beans

Question

Assume an EJB application is comprised of the following EJB fragment: You have been asked to convert the type of InventoryReportBean into a singleton session bean. How would you achieve this task? Exhibit C: Exhibit D:

Exhibits

1Z0-895 question #80 exhibit 1
1Z0-895 question #80 exhibit 2
1Z0-895 question #80 exhibit 3

Options

  • AKeep InventoryReportBean as it is, modifying the internal structure to function as a singleton
  • BChange the @Stateless annotation of InventoryReportBean to @Singleton
  • CCreate an ejb-jar.xml file, and override the annotation configuration information asin exhibit C above.
  • DCreate an ejb-jar.xml file, and override the annotation configuration information asin exhibit D above.

How the community answered

(35 responses)
  • A
    17% (6)
  • B
    9% (3)
  • C
    3% (1)
  • D
    71% (25)

Explanation

Note the line with <override-type>

Topics

#singleton session bean#@Singleton#ejb-jar.xml override#bean type conversion

Community Discussion

No community discussion yet for this question.

Full 1Z0-895 Practice