OFFER Pass4sure and Lead2pass 1Z0-898 PDF & VCE

Vendor: Oracle
Exam Code: 1Z0-898
Exam Name: Java EE 6 Java Persistence API Developer Certified Expert Exam

QUESTION 1
The developer has defined the following entity class office:

image
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:

image
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:

image
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

If you want to pass Oracle 1Z0-898 successfully, donot missing to read latest lead2pass Oracle 1Z0-898 dumps.
If you can master all lead2pass questions you will able to pass 100% guaranteed.

http://www.lead2pass.com/1Z0-898.html

         

Why Choose Lead2pass?

If you want to pass the exam successfully in first attempt you have to choose the best IT study material provider, in my opinion, Lead2pass is one of the best way to prepare for the exam.

Lead2pass Testking Pass4sure Actualtests Others
$99.99 $124.99 $125.99 $189 $29.99-$49.99
Up-to-Dated
Real Questions
Error Correction
Printable PDF
Premium VCE
VCE Simulator
One Time Purchase
Instant Download
Unlimited Install
100% Pass Guarantee
100% Money Back