2014 Latest Oracle 1Z0-898 Exam Dump Free Download!

QUESTION 1
The developer has defined the following entity class office:
 clip_image001
Which of the following attributes will be in corresponding generated static metamodel class for the rooms’ field?

A.    Public static volatile CollectionAttribute<Room> rooms;
B.    Public static volatile ListAttribute<Room> rooms;
C.    Public static volatile ListAttribute<Office, Room> rooms;
D.    Public static volatile SingleAttribute<Room> rooms;

Answer: B

QUESTION 2
Given two entities with many-to-many bidirectional association between them:
 clip_image001[4]
What set of annotations correctly defines the association?

A.    @manyToMany on the projects field,
@manyToMany (mappedBy= “projects”) on the emps field
B.    @manyToMany (mappedBy = emps) on the projects field,
@manyToMany on the emps field
C.    @manyToMany ()targetEntity = project.class) on the projects field,
@manyToMany (mappedBy = “projects”)
on the emps field
D.    @manyToMany (targetEntity = Project.class) on the projects field,
@manyToMany on the emps field

Answer: D

QUESTION 3
An application wants to utilize side effects of cascading entity manager operations to related entities. Which statement is correct?

A.    The persist operation is always cascaded to related entitles for one-to one and one-to-many relationships.
B.    To minimize the effect of the remove operation applied to an entity participating in a many-to many
relationship the remove operation should hecascadeto entities on both sides of the relationship.
C.    The persist operation applied to a new entity x is cascaded to entities referenced by x if the relationship
from x to these other entities is annotated with the cascade=PERSIST or cascade=ALL annotation
element value.
D.    The remove operation applied to a removed entity x is cascaded to entities referenced by x of the relationship
from x to these other entities is annotated with the cascade = REMOVE of cascade = ALL annotation
element value.

Answer: C
Explanation:
http://stackoverflow.com/questions/4748426/cannot-remove-entity-which-is-target-ofonetoone- relation
(answer 1)

QUESTION 4
The Contact Information embeddable class contains address information as well as a reference to a phone entity. The ContactInformation class is defined as follows:
@Embeddable public class ContactInformation {
String street;
String city;
@OneToOne Phone phone;
}
The developer wants to use this class in an Employee entity, but override the default name of the foreign key to the Phone entity. Which of the code segments shows how to do this correctly?

A.    @Entity public class Employee {
@Id int empId;
@AssociationOverride (name = empInfo.phone”, joinColumn = @JoinColumn) (name = “INFO_FK”))
ContactInformation empInfo;
}
B.    @AssociationOverride (name = “empInfo.phone”, joinColumn = “INFO_FK”) @Id int empId;
@ContactInformation empInfo;
}
C.    @ AssociationOverride (name = “empInfo.phone”, joinColumn = “INFO_FK”) Entity public class Employee {
@Id int empId;
}
D.    Entity public class Employee {
@Id int empId;
@ AssociationOverride (name = “empInfo.phone”, joinColumn = “INFO_FK”) ContactInformation empInfo;
}

Answer: A
Explanation:
http://docs.oracle.com/javaee/6/api/javax/persistence/AssociationOverride.html

QUESTION 5
A stateless session bean’s business method invokes EJBContext.setRollBackOnly and receives an IllegalStateException. Under which of these conditions could this be possible?

A.    The business method is marked with the MANDATORY transaction attribute.
B.    The business method is marked with the NONSUPPORTED transaction attribute.
C.    This Is NOT possible; a stateless session bean cannot invoke EJBContext.SetRollBackOnly.
D.    The bean has no metadata (in annotations 01 deployment descriptor) which specifies the transaction
attribute for the method.

Answer: B

QUESTION 6
Given the following stateless session bean implementation classes:
 clip_image002
Assuming no other transaction-related metadata, what are the transaction attributes on methodB, and method C respectively?

A.    MANDATORY, MANDATORY, and MANDATORY
B.    REQUIRED, MANDATORY, and REQUIRES_NEW
C.    MANDATORY, MANDATORY, <and REQUIRES__NEW
D.    REQUIRED, REQUIRES_NEW, and REQUIRES_NEW

Answer: B
Passing your Oracle 1Z0-898 Exam by using the latest 1Z0-898 Exam Dump Full Version: http://www.braindump2go.com/1z0-898.html