Free Oracle 1Z0-860 Exam Questions (page: 16)

D. An entity manager obtained through resource injection in a stateful session bean can use a
resource-local EntityTransaction for transaction control
Answer(s): A
QUESTION: 42
A Java Persistence application uses a Version attribute to manage concurrent updates. Which
is true?

A. The Version attribute must have a public access type.
B. The Version attribute is used by the persistence provider.
C. A separate Version attribute must be specified for each class in the inheritance hierarchy.
D. A separate Version column must be specified for each table mapped to the entity.
Answer(s): B

QUESTION:
43
A developer writes a stateful session bean FooBarBean with two local business interfaces Foo
and Bar. The developer wants to write a business method called getBarfor interface Foo that
returns a Bar reference to the same session bean identity on which the client invokes getBar.
Which code, when inserted on Line 12 below, implements the getBar method with the wanted
behavior?
10.?Resource SessionContext sessionCtx;
11. public BargetBarOJ
12.
13.}

A. return(Bar)this;
B. return(Bar) new FooBarBeanQ;
C. return (Bar) sessionCtx.lookup("FooBarBean")
D. return (Bar) sessionCtx.getBusinessObject(Bar.class);
E. InitialContextic= new InitialContextQ;
return (Bar) ic.lookup("java:comp/env/ejb/FooBarBean");
Answer(s): D
QUESTION: 44
Which statement about the combination of mapping defaults, annotations, and XML descriptors
is correct?

A. Al mapping annotations must always be processed by the persistence provider.
B. Some annotations, like the @Entity annotation, must always be processed by the persistence
provider.
C. The mapping information for an entity class specified by annotations and in XML descriptors
must be distinct.
D. If multiple entity listeners are defined, the order in which they are invoked can be defined or
overwritten in the XML descriptor.



17

Viewing page 16 of 108



Post your Comments and Discuss Oracle 1Z0-860 exam prep with other Community members:

1Z0-860 Exam Discussions & Posts