310-091 SCBCD SUN Other Certifications Braindump
ExamSoon 310-091 Exams
SUN Sun Certified Bus.Component Developer Java EE Platform 5
O rder : 310-091 Exam
Practice Exam: 310-091
Exam Number/Code: 310-091
Exam Name: Sun Certified Bus.Component Developer Java EE Platform 5
Questions and Answers: 305 Q&As
Free 310-091 Braindumps
Exam : SUN 310-091
Title : Sun Certified Bus. Component Developer Java EE Platform 5
1. Given two entities with a many-to-many bidirectional association between them:
11. @Entity public class Employee {
12. Collection projects;
13. // more code here
14. }
and
11. @Entity public class Project{
12. Set<Employee> emps;
13. // more code here
14. }
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: C
2. A developer implements a session bean with a method doStuff which behaves differently depending on the caller's
security role. Only users in security roles "ADMIN" and "USER" are allowed to call the method. Assume that there is
no security-related metadata in the deployment descriptor. Which two, taken in combination, are appropriate to
accomplish this? (Choose two.)
A. Annotate method doStuff with @PermitAll.
B. Annotate method doStuff with @RolesAllowed({"ADMIN","USER"})
C. If EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for users in role ADMIN.
D. If EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for users in role "ADMIN".
Answer: BD
3. Collection projects;
13. // more code here
14. }
and
11. @Entity public class Project{
12. Set<Employee> emps;
13. // more code here
14. }
What set of annotations correctly d