Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Oracle 1Z0-860 Exam - Cheat-Test.com

Free 1Z0-860 Sample Questions:

Q: 1
Which is a valid PostConstruct method in a message-driven bean class?
A. @PostConstruct
public boolean init() { return true; }
B. @PostConstruct
private static void init() {}
C. @PostConstruct
private void init() {}
D. @PostConstruct
public static void init() {}
Answer: C

Q: 2
Given:
11. @Entity public class X {
12.@Id int id;
13.Y y;
14. }
A public class Y with NO Java Persistence annotations is defined in the same package.
Which statement is correct about these classes if NO other annotations and mapping descriptors are provided?
A. Class Y must be serializable.
B. Class Y must be marked as an entity.
C. The entity X is not defined correctly.The field y must be marked as @Lob.
D. Class Y must be accessed by a persistence application through a public interface.
Answer: A

Q: 3
A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes registerUser again with corrected data using the same transaction. Which design can meet this requirement?
A. Have registerUser method call EJBContext.setRollbackOnly() method after registration fails.
B. Have registerUser method throw javax.ejb.EJBTransactionRequiredException after registration fails.
C. Have registerUser method throw EJBException without marking the transaction for rollback, after registration fails.
D. Create an application exception with the rollback attribute set to false and have registerUser method throw it after registration fails.
Answer: D

Q: 4
Which two class types must be implicitly or explicitly denoted in the persistence.xml descriptor as managed persistence classes to be included within a persistence unit? (Choose two.)
A. Entity classes
B. Interceptor classes
C. Embedded classes
D. Entity listener classes
Answer: A, C

Q: 5
Which statement about the combination of mapping defaults, annotations, and XML descriptors is correct?
A. All 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.
Answer: D

Q: 6
Which statement about an entity instance lifecycle is correct?
A. A new entity instance is an instance with a fully populated state.
B. A detached entity instance is an instance with no persistent identity.
C. A removed entity instance is NOT associated with a persistence context.
D. A managed entity instance is the instance associated with a persistence context.
Answer: D

Q: 7
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: B, D

Q: 8
A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account:
11. @Entity
12. @EntityListeners(com.acme.AlertMonitor.class)
13. public class Account {
14.// more code here
15.@PrePersist
16.protected void validateCreate() {/* more code here */}
17. }
Which statement is correct?
A. The validateCreate method may NOT throw runtime exceptions.
B. The validateCreate method can invoke the EntityManager.flush operation.
C. Methods of the class com.acme.AlertMonitor annotated with callback annotations must take an Object or Account instance as the only argument.
D. The above class definition is NOT correct. An entity cannot define a callback method like PrePersist and use the EntityListeners annotation at the same time.
Answer: C

Q: 9
Given:
11. @PersistenceContext EntityManager em;
12. public boolean test(Order o) {
13.boolean b = false;
14.o = em.merge(o);
15.em.remove(o);
16.o = em.merge(o);
17.b = em.contains(o);
18.return b;
19. }
Which statement is correct?
A. The method will return TRUE.
B. The method will return FALSE.
C. The method will throw an exception.
D. The Order instance will be removed from the database.
Answer: C

Q: 10
The deployment descriptor for a stateless session bean that uses the isCallerInRole method reads as follows:
3. <security-role-ref>
4.<role-name>manager</role-name>
5.<role-link>humanresources</role-link>
6. <security-role-ref>
16. <security-role>
17.<description>
18.Is allowed to view and update all employee records.
19.</description>
20.<role-name>humanresources</role-name>
21. </security-role>
Which two roles are responsible for creating this deployment descriptor? (Choose two.)
A. Deployer
B. Bean Provider
C. System Administrator
D. Application Assembler
Answer: B, D


© 2014 Cheat-Test.com, All Rights Reserved