Oracle 1Z0-860 - Questions & Answers
Free preview · every answer includes a full explanation
Product page: https://prepkeys.com/1z0-860.html
Given the following stateful session bean:
10. @Stateful
11. @TransactionAttributefJransactionAttributeType. SUPPORTS)
12. public class VideoBean implements Video {
13. // insert code here
14. public void methodAO {}
15.}
Assuming no other transaction-related metadata, which code can be added at Line 13 to guarantee that business method methodA will execute only if invoked with an active transaction?
Given the following client-side code that makes use of the session bean Foo:
10. @EJB Foo beanl;
11. @EJB Foo bean2; //more code here
20. booleantestl = beanl.equals(beanl);
21. booleantest2 = beanl.equals(bean2);
Which two statements are true? (Choose two.)
Which statement about entity manager is true?
Which statement is true about the use of a persist operation in a transaction?
A developer writes a stateless session bean with one local business interface and with container-managed transactions. All 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 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.)
Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
Given:
11.©Entity public class X{
12. @ld 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 developer creates a stateless session bean. This session bean needs data from a remote system.
Reading this data takes a long time. Assume that the data will NOT change during the lifetime of the bean and that the information to connect to the remote system is defined in JNDI.
Which statement describes how to manage the data correctly?
An enterprise bean has security permissions set up using declarative security features.
Under which two conditions can a client be guaranteed to have permission to invoke a business method on the enterprise bean? (Choose two.)