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.
B. The clientreceivesareturnvalueof "zero".
C. The client receivesa returnvalue of "not zero".
D. The client receivesareturn value of "intercepted".
A developer is declaring a persistent entity that will be passed as a detached object through a remote interface to an application client. Which two characteristics must the corresponding persistent entity class have? (Choose two.)
A. implement serializable
B. includeano-arg constructor
C. make instance variables public
D. implement the remote interface
A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes registerUser again with corrected data using the same transaction. Which design can meet this requirement?
A. Have registerUser method call EJBContext.setRollbackOnlyOmethodafter registration fails.
B. Have registerUser method throw javax.ejb.EJBTransactionRequiredExceptionafterregistration fails.
C. HaveregisterUser method throw EJBException without marking the transaction for rollback, after registration fails.
D. Create an application exception withtherollbackattributeset to falseandhave registerUser method throwit afterregistration fails.
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.
A Java EE 5 application contains a session bean which uses a security role USER. A group called people is defined in an LDAP server. Which two define appropriate EJB role responsibilities? (Choose two.)
A. The deployer definesandconfigures the LDAP realm.
B. The system administratordefines and configuresthe LDAPrealm.
C. Thedeployermaps the application role USER totheLDAP group people.
D. Thesystem administrator maps the application role USER totheLDAP group people.
A developer writes client code that runs in a Java EE container and accesses an EJB 3.0 stateful session bean. Which three statements are correct? (Choose three.)
A. The client can obtain a reference to the bean's business interface through JNDI lookups.
B. The client can obtain a reference to the bean's business interface through dependency injection.
C. If the client calls a business method after the bean instance has been removed an exception will occur.
D. After obtaining a reference to the bean's business interface, the client must call the create method before it may call business methods.
E. After the bean instance has been passivated, the client needs to re-obtain a reference to the bean's business interface to activate the bean instance.
Which two are true about the Java EE 5 client-view of a message-driven bean? (Choose two.)
A. Referencestomessage destinations can be injected.
B. Asof EJB3.0, referencestomessage destinations cannot be looked upin theclient's JNDI namespace.
C. Clients of a message destination need to know that the destination is listened to byapool of message consumers.
D. Clients of a message destination do NOT needto knowthat the destination is listened to by a message-driven bean.
Which two statements are true? (Choose two.)
A. Alltypes ofenterprise beans can be transaction-aware.
B. Typically, fine-grained objects, such as an employee record, should be remotely accessible.
C. Theclientview ofanygiven enterprise bean will be consistent acrossall EJB3.0 containers withouttheneed to recompile the bean.
D. As long as a given enterprise bean is NOT recompiled, its security attributes are guaranteed to be consistent across all EJB 3.0 containers in which it is deployed.
A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction. Which two are correct? (Choose two.)
A. The transaction timeout is immediately disabled.
B. The container will ensure that the transaction will never commit.
C. The bean must have started the current transaction for this to be legal.
D. The bean must have bean-managed transaction demarcation for this to be legal.
E. Thebean must have container-managed transaction demarcation for this to be legal.
A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes registerUser again with corrected data using the same transaction. Which design can meet this requirement?
A. Have registerUser method call EJBContext.setRollbackOnlyOmethodafter registration fails.
B. Have registerUser method throw javax.ejb.EJBTransactionRequiredExceptionafterregistration fails.
C. HaveregisterUser method throw EJBException without marking the transaction for rollback, after registration fails.
D. Create an application exception withtherollbackattributeset to falseandhave registerUser method throwit afterregistration fails.
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.