A Java Persistence application uses entities mapped to tables from two datasources in the same transaction. What statement is correct?
A. This is NOT possible.
B. The entities mustbepackaged into two persistence units.
C. The entitiescanbe packaged intoa singlepersistence unit
D. Theentities must be packaged usingtwo differentpersistence.xml files.
Session bean A is a client of session bean B. Bean A is using container-managed transactions and Bean A invokes a business method of bean B. Under which two circumstances does bean A know for certain that continuing the transaction is fruitless? (Choose two.)
A. Bean A receives an application exception.
B. Bean Areceives ajava.rmi.RemoteException.
C. Bean A's invocationofUserTransaction.getStatus returnsfalse.
D. Bean A's invocation of EJBContext.getRollbackOnly returns true.
E. Bean Areceives ajavax.ejb.EJBTransactionRolledbackException.
FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed transaction demarcation. All business methods in the two beans have transaction attribute REQUIRED. The business method foo in FooBean invokes the business method bar in BarBean. Given :
10.
public class BarBean {
11.
public void bar0{
12.
throw new EJBException("unexpected error..."); 13.}
Which statement is true about the result of this method invocation assuming execution reaches Line 12?
A. Thecontainer mightroll back the transaction.
B. TheBarBean bean instance is in the ready stateforthe next invocation.
C. FooBean.foomethod receives javax.ejb.EJBTransactionRolledbackException.
D. FooBean.foo method receives javax.transaction.InvalidTransactionException.
A Reader entity has a one-to-many, bidirectional relationship with a Book entity. Two Reader entities are persisted, each having two Book entities associated with them. For example, readeM has booka and bookb, while reader2 has bookc
and bookd.
Which query returns a Collection of fewer than four elements?
A. SELECT b.reader FROM Book b
B. SELECT r FROM BookbINNER JOINb.readerr
C. SELECTrFROM Reader r INNER JOIN r.booksb
D. SELECTrfrom BookbLEFT JOIN b.readerr LEFTJOINFETCHr.books
A developer wants to create a business interface for both local and remote usage. For performance reasons the remote interface should NOT be called by a client in the same JVM. Which statement is required to accomplish this, assuming there is no deployment descriptor?
A. The business methods are defined in one interface which must be annotated with both @Local and @Remote.
B. The business methods are defined twice in one interface. One method is annotated with @Local and the other is annotated with @Remote.
C. The business methods are defined in a common interface by two other interfaces which are annotated with @Local and @Remote respectively. The bean implements the super interface.
D. The business methods are defined in a common interface. It is extended by two interfaces, annotated with @l_ocal and @Remote respectively. Both interfaces are implemented by the bean class.
A 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.
B. Optimistic locking can be used by Java Persistence applications to set optimistic locks on tables in the database.
C. The Version attribute of an entity using optimistic locking is verified each time the instance is loaded from the database.
D. Optimistic locking ensures that updates or deletes are consistent with the current state of the database and that intervening updates are not lost.
A developer is implementing a message-listener method of an EJB 3.0 message-driven bean. The developer wants to make sure that the message receipt is immediately rolled back in case the message listener method is aborted with a runtime exception. Which option can the developer use?
A. Use Container-Managed Transactions with transaction attribute REQUIRED.
B. Use Container-Managed Transactions with transaction attribute NOT_SUPPORTED.
C. Use Bean-Managed Transactions and the JMS API for message acknowledgement.
D. Use Bean-Managed Transactions and write a try-catch-finally block that calls UserTransaction. rollback in case of a RuntimeException.
Given an EJB 3.0 J MS message-driven bean, which statement is true about its exception handling?
A. Its message listener method must NOT throw any checked exception.
B. Its message listener method can throw java. rmi. RemoteException.
C. Its message listener method can throw any checked exception except java. rmi. RemoteException.
D. Its message listener method can throw any checked exception that implements java. io.Serializable.
The syntax of the ORDER BY clause is defined in the Java Persistence API as orderby_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.
B. Fields or properties of any type can be specified as an orderbyjtem.
C. The ordering must be specified if two or more orderbyjtem methods are provided.
D. If two orderbyjtem methods are provided the left orderbyjtem has the higher precedence.
A developer is required to declare a persistent entity named Truck to map to a database table VEHICLE. Which entity class declaration is correct, assuming there is NO mapping descriptor?
A. 1. @Entity(name="VEHICLE") public class Truck {
2.
@ld int vehld;
3.
double payload;
4-i
B. 1. @Entity(table="VEHICLE") public class Truck {
2.
@ld int vehld;
3.
double payLoad;
4-}
C. 1.©Embedded @Table("VEHICLE") public class Truck {
2.
@ld int vehld;
3.
double payload;
4-i
D. 1.©Entity @Table(name="VEHICLE") public class Truck {
2.
@ld int vehld;
3.
double payload;
4.1
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.