Free 1Z0-860 Braindumps

Answer(s): A
QUESTION: 4
Which statement is true about the use of a persist operation in a transaction?

A. If a user persists a detached object it always becomes managed.
B. The persist operation on an entity always cascades to its related entities.
C. If a user persists a new entity with an existing primary key the transaction will fail.
D. If a user persists a managed entity an exception may be thrown by the persist operation.
Answer(s): C
QUESTION: 5
A developer writes a stateless session bean with one local business interface and with
container- managed transactions. Al business methods have transaction attribute REQUIRED.
The bean has an injected field sessionCtx of the type SessionContext. Which two operations
are allowed in a business method of the bean? (Choose two.)

A. sessionCtx. getEJBObject
B. sessionCtx.setRollbackOnly
C. sessionCtx. getMessageContext
D. sessionCtx. getBusinessObject
E. sessionCtx. getEJBLocalObject
Answer(s): B, D

QUESTION: 6
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 @PermitAII.
B. AnnotatemethoddoStuff with@RolesAllowed({"ADMIN", "USER"})
C. If EJBContext.getCal erPrincipal returns role "ADMIN", implement thebehaviorfor users in
role ADMIN.
D. If EJBContext.isCallerlnRole("ADMIN") returns true, implement the behavior defined for users
in role "ADMIN".
Answer(s): B, D
QUESTION: 7
Which Java Persistence query uses the aggregate function correctly, assuming that chairs field
is of type int?

A. SELECT ANY(r. chairs) FROM Room r
B. SELECT NEW Integer(MAX(r. chairs)) FROM Room r


3

Get The Premium Version

Allbraindumps.com
 Test Questions PDF from Myitguides.com

 Test Questions PDF from Myitguides.com