A developer writes an enterprise application and packages it into an .ear file. The application contains two persistence units defined at the .ear level with persistence unit names FooPU and BarPU. The application also contains an ejb-jar with one stateless session bean. Which code, when added to the stateless session bean class, injects an EntityManagerFactory at runtime?
A. PersistenceUnit private EntityManagerFactory emf; B. PersistenceContext private EntityManagerFactory emf;A developer wants to achieve the following two behaviors:
(1)
If a client calls a business method without a transaction context, the container will invoke the bean in an unspecified transaction context.
(2)
If a client calls a business method with a transaction context, the container will suspend the association of the transaction context with the current thread before invoking the enterprise bean's business method. Which transaction attribute should be used?
A. NEVERA 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.Which two options can be used to predefine Java Persistence queries for easy use? (Choose two.)
A. @NamedQuery annotationWhich component can use a container-managed entity manager with an extended persistence context?
A. any EJB componentA company has a business application that allows end users to order products over the web. A developer in the company wants to add the following capability to the application:
When the web-tier handles a new order, it should notify all the interested beans in the EJB-tier. To satisfy this new capability, the developer wants to use a message-driven bean and must choose between associating it with a javax.jms.Topic
destination or a javax.jms.Queue destination. Which two are true about this decision? (Choose two.)
A. JMS Topics are intendedtobe usedtosolvethistype of scenario.A developer wants to have bookingDate stored in table BOOKING, flightNumber in table FLIGHTBOOKING, and hotelName in table HOTELBOOKING. Which code, inserted at Line 11 of class Booking, is appropiate for this strategy?
A. ©JoinedGiven this code snippet from a JMS message-driven bean class named MyMDB:
11.
public MyMDBOJ System, out. print("a "); }
12.
public void onMessage(Message m) { System, out. print("b "); }
13.
@PreDestroy
14.
public void removeQ { System, out. print("c "); } The container crashes and then restarts and then the bean class handles two messages.
Which four are possible results? (Choose four.)
A. abbA developer is working with an entity User, which has an identity field and a salary field. Which Java Persistence query will return those users with the highest salaries?
A. SELECT u FROM User u WHERE u.salary >= ALL (SELECT d.salary FROM User d)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.classNowadays, 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.