Given:
11.
@PersistenceContext EntityManager em;
12.
public boolean test(Order o) {
13.
boolean b = false;
14.
o = em.merge(o); 15 em.remove(o);
16.
o = em.merge(o);
17.
b = em.contains(o);
18.
return b;
19.}
Which statement is correct?
A. The method will return TRUE.
B. Themethod will return FALSE.
C. Themethodwill throw an exception.
D. TheOrder instance willberemoved from the database.
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.
B. A stateful session bean that has one remote business interface and is a Web service endpoint.
C. A message-driven bean that has one message listener interface and is a Web service endpoint.
D. A stateless session bean that has three local business interfaces and is a Web service endpoint.
Within a Java EE environment, which annotation can be used to inject an entity manager factory?
A. ©Entity
B. ©Factory
C. @JTAFactory
D. @PersistenceUnit
E. ©PersistenceContext
Which statement about mapping using the Java Persistence API is correct?
A. User-defined XML mapping files can be used only if orm. xml file is NOT present.
B. All mapping files other than orm. xml must be listed explicitly in the persistence, xml descriptor.
C. Mapping information specified in the XML mapping file overrides all annotations and default mappings.
D. The orm.xml file must be placed into the persistence unit's root to be processed by the persistence provider.
Consider a deep inheritance hierarchy consisting of Java Persistence entity classes, non- entities, and mapped superclasses. Which statement is correct, assuming NO mapping descriptor is present?
A. An entity class must NOT inherit from a non-entity class.
B. An entity class must NOT be extended by a non-entity class.
C. Only the root class in an inheritance hierarchy can be annotated wtith @MappedSuperclass.
D. The primary key must either be defined in the topmost entity class of the inheritance hierarchy or it can be defined in a superclass if this class is annotated as @MappedSuperclass.
Given the method invocation sequence:
Method 1 calls Method 2 Method 2 calls Method 3 Method 1 calls Method 4 And the transaction scope:
Method 1Transaction A Method 2Transaction A Method 3Transaction A Method 4Transaction B Assuming Method 1 is invoked by a client without an existing transaction context, which set of transaction attributes will support this scope?
A. Method1NEVER Method 2SUPPORTS Method 3REQUIRED Method 4REQUIRES_NEW
B. Method1REQUIRES_NEW Method 2MANDATORYMethod 3SUPPORTS Method 4REQUIRES_NEW
C. Method1REQUIRES_NEW Method 2MANDATORY Method 3SUPPORTS Method 4SUPPORTS
D. Method 1MANDATORY Method 2REQUIREDMethod 3SUPPORTSMethod 4REQUIRES NEW
A developer examines a list of potential enterprise applications and selects the most appropriate technologies to use for each application. For which two applications is EJB 3.0 an appropriate solution? (Choose two.)
A. torenderaGUI for mobile clients
B. as a container for web-tier components including JSP
C. as a Web serviceendpointaccessedbynon-Java clients
D. to receiveandrespondto HTTP Postrequests directly fromaweb browser
E. asanonline shoppingcart whichcan persist across multiple sessions with a single client
The Java Persistence API defines EntityTransaction interface. Which statement is correct?
A. It is used to control transactions on JTA entity managers.
B. It is used to control transactions on resource-local entity managers.
C. All methods of this interface will throw HlegalStateException if a transaction is NOT active.
D. Calling getTransaction method on a closed entity manager will throw an HlegalStateException.
The execution of the find method in the following code throws an exception:
11.
em.find(Customer.class, custld);
12.
//Where em is a reference to a extended scoped entity manager.
Which scenario can cause the exception?
A. Thefindmethod was called without a transaction.
B. Theentity corresponding to therequestedprimary key has been removed.
C. The entity corresponding to therequestedprimarykeyhas beendetached.
D. The data type of custld is NOT a valid type fortheCustomer entity primary key.
Bean Provider has been asked to write a stateless session bean, MyBean with a single method breakout. A System Administrator guarantees that all clients accessing the bean will be identified by mutual SSL authentication. The Bean Provider's task is to ensure that breakout always logs identity information of the client that invoked it. Which solution would satisfy this requirement?
A. Access the identity information in the X.509 certificate used to authenticate the user from withinbreakout.
B. UsethegetCallerPrincipalmethod onan injected SessionContext to determinetherequired information.
C. Use the isCallerlnRole method onaninjected SessionContext todeterminethe required information.
D. Ensurethatthe breakout method is appropriately annotatedwith@RolesAllowed.
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.