Which three statements are true about EJB 3.0 containers? (Choose three.)
A. Remote argument passing semantics conform to Java RMI-IIOP.
B. The JAXB 2.0 API is guaranteed to be available for all bean types.
C. The Java 2D API is guaranteed to be available for session beans.
D. javax. naming. InitialContext is guaranteed to provide a JNDI name space.
E. The Java Telephony API is guaranteed to be available for session and message beans.
F. javax.transaction. UserTransaction cannot be used by beans when bean- managed transaction demarcation is used.
A developer writes an enterprise application and packages it into an enterprise archive (EAR). The application contains one persistence unit with unit name "FooPU". The application also contains an ejb-jar with one stateless session bean. Which code, when added to the stateless session bean class, injects a container-managed persistence context at runtime?
A. @PersistenceContext EntityManager em;
B. @Resource(unitName="FooPU") EntityManager em;
C. @PersistenceUnit(unitName="FooPU") EntityManager em;
D. @PersistenceContext(unitName="persistence/FooPU") EntityManager em;
A developer wants to create a Java Persistence query that restricts the results of an age- based query. Specifically, the developer wants to select everyone who is NOT a teenager. (A teenager is someone who is 13,14,15,16,17,18, or 19
years old.)
Which expression in the query's WHERE clause is correct?
A. WHEREp.age NOTBETWEEN12and20
B. WHERE p.age NOTBETWEEN 13and20
C. WHERE p.age NOT BETWEEN12and 19
D. WHERE p.age NOT BETWEEN 13 and 19
A developer writes a stateless session bean FooBean and uses its deployment descriptor to declare a local ejb dependency on a stateful session bean in the same ejb-jar.
Which environment annotation, when declared within the FooBean bean class, is equivalent to the ejb-local-ref shown above?
A. @EJB(beanName="BarBean") private acme. Bar barRef;
B. @EJB(name="bar", beanName="BarBean") private acme.BarbarRef;
C. @EJB(name="barRef,beanName-'BarBean") privateacme.Bar bar;
D. @EJB(name="ejb/barRef, beanName-'BarBean") private acme.Bar bar;
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.
Which is the valid use of the javax.ejb.lnit annotation?
A. to annotate a method in a stateful session bean class so that the container will invoke it after the EJB is deployed and started
B. to specify the correspondence of a method on a stateful session bean class with a create method of the adapted home interfaces
C. to annotate a bean class inside the ejb-jar archive to act as a bootstrap EJB which is loaded into the container before any other EJBs
D. for a client to invoke the method annotated with @lnit to initialize a newly created stateful session bean instance with user-specific data
Given the following stateless session bean implementation classes:
10.
@TransactionAttributefJransactionAttributeType. MANDATORY)
11.
public class MySuperj
12.
public void methodAfJO
13.
public void methodBOJ}
14.}
10.©Stateless
11.
public class MyBean extends MySuper implements Mylntj
12.
public void methodAOJ}
13.
14.
@TransactionAttributeO"ransactionAttributeType.REQUIRES_NEW)
15.
public void methodC0 {}
16.}
10.
@RemoteO
11.
public interface Mylntj
12.
public void methodAO;
13.
public void methodB0;
14.
public void methodC0;
15.}
Assuming no other transaction-related metadata, what are the transaction attributes of methodA, methods, and methodC respectively?
A. MANDATORY, MANDATORY, and MANDATORY
B. REQUIRED, MANDATORY, and REQUIRES_NEW
C. MANDATORY, MANDATORY, and REQUIRES_NEW
D. REQUIRED, REQUIRES NEW, and REQUIRES NEW
Which is a correct way of defining a runtime exception as an EJB 3.0 application exception?
A. public class MyAppException extends javax.ejb.EJBException
B. @ApplicationException public class MyAppException extends Java. rmi.RemoteException
C. public class MyAppException extends Java. lang. RuntimeException
D. @ApplicationException public class MyAppException extends Java. lang. RuntimeException
A Java Persistence application uses the EntityManager.flush method to synchronize the current persistence context with the database. Which two statements are correct? (Choose two.)
A. The flush method might cause the persist operation to be cascaded to related entities.
B. Extensive use of the flush method decreases the performance of a Java Persistence application.
C. The flush method should be used to synchronize the current persistence context with modifications made in other transactions.
D. The flush method should be used to publish changes done in the current persistence context to other transactions before actual transaction commit.
Which component can use a container-managed entity manager with an extended persistence context?
A. any EJB component
B. only stateful sessionbeans
C. only stateless session beans
D. session beans and web components
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.