Free 1Z0-898 Braindumps


  • Exam Number: 1Z0-898
  • Provider: Oracle
  • Questions: 63
  • Updated On: 17-Nov-2018

QUESTION: 1
Entity lifecycle callback methods may be defined in which three classes? (Choose three)

A. Embedded classes
B. Entity classes
C. Abstract classes
D. Entity listener classes
E. Mapped superclasses
F. Concrete non-entity superclasses

Answer(s): B, D, E
Explanation:
Entity Listeners and Cal back Methods
A method may be designated as a lifecycle callback method to receive notification of entity
lifecycle events. A lifecycle callback method can be defined on an entity class, a mapped
superclass, or an entity listener class associated with an entity or mapped superclass.
Reference:
How to inject a spring's service bean into a JPA Entity?
http://stackoverflow.com/questions/3747268/how-to-inject-a-springs-service-bean-into-a-jpa-
entity
QUESTION: 2
A developer wrote an entity class with the following method:
Private static Logger logger = Logger.getLogger ("myLogger");
@PrePersist
@PreUpdate
Public void doA () {
Logger.info ("A");
}
@PostPersist
@PostUpdate
Public void doB () {
logger.info ("B");
}
What will the log message contain when an application does the following?
1. Begins a transaction
2. Creates the entity
3. Persists the entity
4. Commits the transaction
5. Begins the entity data
6. Modifies the entity data
7. Merges the entity
8. Commits the second transaction

A. A
A
B
B
B. A
B

Get The Premium Version

Allbraindumps.com
 Test Questions PDF from Myitguides.com

 Test Questions PDF from Myitguides.com