Which two are true about specifying Java EE environment annotation metadata for session bean classes? (Choose two.)
A. Itis possible to inject a resource without using annotations.Given the following code in an EJB 3.0 session bean:
10.
@Resource(name="jdbc/employeeDB")
11.
private DataSource dataSource;
12.
13.
public void lookupEmployee(String id) {
14.
InitialContext ic = new InitialContextO;
15.
// insert code here
16.
DataSource ds = (DataSource) obj;
17.}
Which code, inserted at Line 15, portably looks up the injected resource?
A. Object obj = ic.lookup("employeeDB");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.Your application uses the Java Persistence API to access a database. This application must reject adding an instance to the database if it does NOT pass validation tests for values of two persistence properties. The database contains some data that will NOT pass such validation. Only the new records must be validated. Which option will achieve this behavior?
A. Add validation logic tothesetter methods for each property.A developer writes a session bean which uses several configurable constants. The constants are all defined as String types in JNDI. This cannot be changed because existing code is using the same JNDI information. One of the constants is a date, represented in string format. This date constant is used in multiple business methods of this session bean, actually as a Date object. Converting strings to dates is an expensive operation; therefore, the developer wants to do as little converting as possible. Which two scenarios can be used to prevent converting from String to Date in every business method? (Choose two.)
A. Loadthe date string in an instance Date type variablebyannotation of the instance variable and let the container autoconvert it to a Datetypeautomatically.A deployer is given the following session bean:
10.
©Stateless
11.
@RolesAllowed("BATH")
12.
@DeclareRoles("SOAP")
13.
public class ShowerBean implements Shower {
14.
public void plugO {} 15.}
and the following associated excerpt from the ejb-jar.xml descriptor file:
20.
21.
22.
23.
24.
Which roles is the deployer expected to map to users or user groups?
A. TOWELWhich two statements are true about EJB 3.0 JMS message-driven beans? (Choose two.)
A. The developer can use JMS messageselector declarationsto restrict the messages that the bean receives.The syntax of the ORDER BY clause is defined in the Java Persistence API asorderby_clause ::=ORDER BY orderbyjtem {, orderbyjtem}* Which statement is correct about the use of ORDER BY clauses?
A. Only literals can be specified as an orderbyjtem.A developer creates a statelesssession bean, EmployeeServiceBean, and itsinterface, EmployeeSeivice. The session bean uses two annotated entity classes, Employee.class and Department.class. Which two packaging options can the developer use when creating a deployable EAR? The proposed directory structure is listed for each option. (Choose two.)
A. emp.ear emp-ejb.jar META-INF/persistence. Xml EmployeeSeivice. Class EmployeeServiceBean. Class lib/emp-classes.jar Employee.class Department.classWhich two statements about the EJBContext. isCallerlnRole method are correct? (Choose two.)
A. Message-drivenbeans must NOT call the isCallerlnRole method.Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-860 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.