A User entity is in a one-to-many relationship with a Book entity. Assume that a developer has a function fetchBook(String title) that fetches a Book entity with the given title title. Also assume that the developer has an entity manager em. Which query can be used to return the user that holds the book titled "Java"?
A. em.createQueryfSELECT u FROM User u where :great INA Java Persistence application wants to use optimistic locking. Which statement that describes the functionality of optimistic locking is correct?
A. The Version attribute of an entity using optimistic locking can be mapped to a secondary table.A developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method:
11.
@Aroundlnvoke
12.
public Object intercept(lnvocationContext ctx) {
13.
return "intercepted";
14.}
Foolnterceptor is applied to a business method in a stateless session bean:
11.
@lnterceptors(Foolnterceptor.class)
12.
public String testzero(int i) {
13.
return (i == 0) ? "zero""not zero";
14.
}
Which describes the result when a client invokes the testzero method with a value of 1?
A. The intercept method is NEVER invoked.A developer implements a system in which transfers of goods are monitored. Each transfer needs a unique ID for tracking purposes. The unique ID is generated by an existing system which is also used by other applications. For perfomance reasons, the transaction that gets the unique ID should be as short as possible. The scenario is implemented in four steps which are implemented in four business methods in a CMT session bean: LcheckGoods Checks goods in a database 2.getUniqueld Retrieve the unique ID 3.checkAmount Checks the amount in a non-transactional system 4.storeTransfer Stores the transfer in a database as part of the calling transaction. These methods are called by the addTransfer method of a second CMT session bean in the following order: checkGoods, getUniqueld, checkAmount, storeTransfer Assuming no other transaction-related metadata, which is the correct set of transaction attributes for the methods in the session beans?
A. 0.addTransfer REQUIRED 1.LcheckGoods REQUIRED 2.getUniqueldREQUIRES_NEW 3. checkAmountsNOT_SUPPORTED 4. storeTransferMANDATOR YA developer wants to implement a relationship between Company and Department entity classes. Every department belongs to one company, and one company has several departments. In this application it is essential to quickly determine which company a department belongs to and to also easily access all departments of a given company. Which two declarations provide a solution to these requirements? (Choose two.)
A. In class Department @ManyToOne private Company company;FooBean is an EJB 3.0 session bean that can make valid use of UserTransaction. Which is guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?
A. Invoke a method on a SessionContext that returns a UserTransaction object.A developer's objective is to end the persistence context associated with an application- managed entity manager. Which statement is correct?
A. Invoke the flush method of theentitymanager.A developer has obtained a container-managed entity manager with transaction scoped persistence context. Assume there is no persistence context associated with the entity manager. When does a new persistence context begins?
A. whenaJTA transaction beginsA developer wants to create a JMS message-driven bean that responds to javax.jms.TextMessage messages. Which two statements are true? (Choose two.)
A. The developer must implement the ejbCreate method.Which statement describes a component definition that is allowed by the EJB 3.0 specification?
A. A stateful session bean that is a Web service endpoint.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.