nerdexam
Oracle

1Z0-898 · Question #27

A JavaEE application is packaged as follows. Which of the following is true for a portable JavaEE application?

The correct answer is B. "MyPu" defined under each module is visible to only the defining module. There is no way other. Persistence units are defined by the persistence.xml configuration file. The JAR file or directory whose META-INF directory contains persistence.xml is called the root of the persistence unit. The scope of the persistence unit is determined by the persistence unit's root. Each…

JPA Fundamentals

Question

A JavaEE application is packaged as follows. Which of the following is true for a portable JavaEE application?

Exhibit

1Z0-898 question #27 exhibit

Options

  • AThis is an invalid application. A JavaEE application cannot have more than one persistent with
  • B"MyPu" defined under each module is visible to only the defining module. There is no way other
  • CCode in the ejb1.jar can access "MyPU" defined under war1.war using "war1#myPU"

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    79% (19)
  • C
    17% (4)

Explanation

Persistence units are defined by the persistence.xml configuration file. The JAR file or directory whose META-INF directory contains persistence.xml is called the root of the persistence unit. The scope of the persistence unit is determined by the persistence unit's root. Each persistence unit must be identified with a name that is unique to the persistence unit's scope.

Topics

#persistence unit visibility#JavaEE packaging#module scoping#persistence unit

Community Discussion

No community discussion yet for this question.

Full 1Z0-898 Practice