1.
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?
2.
A developer writes an enterprise application and packages it into an .ear file. The application contains two persistence units defined at the .ear level with persistence
unit names FooPU and BarPU. The application also contains an ejB. jar with one stateless session bean. Which code, when added to the stateless session bean
class, injects an EntityManagerFactory at runtime?
3.
Which statement about the combination of mapping defaults, annotations, and XML descriptors is correct?
4.
An Application Assembler is given the following stateless session bean:
10. @Stateless public class MyBean implements Mylnt {
11. @RolesAllowed("SECRET")
12. public void methodA(int x) {}
13. public void methodA(String y) {}
14. public void methodB(String z) {}
15.}
A deployment descriptor is also supplied, a portion of which reads as follows:
20.
21. AGENT
22.
23. MyBean
24. methodA
25.

26.
Which statement is true?
5.
A User entity is in a one. to-many relationship with a Book entity. A developer writes a query to delete users that have a first name of 'Fred' or 'Ginger', and writes
the following Java Persistence query language statement:
DELETE FROM User u WHERE u.name IN ('Fred1, 'Ginger')
If the query fails with a PersistenceException, what can be the cause?
6.
A Java Persistence application uses entities mapped to tables from two datasources in the same transaction. What statement is correct?
7.
Which statement describes a component definition that is allowed by the EJB 3.0 specification?
8.
Given:
11. @Entity public class X {
12. @ld int id;
13. Y y;
14. }
A public class Y with NO Java Persistence annotations is defined in the same package. Which statement is correct about these classes if NO other annotations and
mapping descriptors are provided?
9.
Given code snippets from two files: 7. public class Dog { 8. public void onMessage(Message m) { System.out.print("1 "); } 9- } and 10. @MessageDriven 11. class MessageDog extends Dog implements MessageDrivenBean { 12. MessageDog(Message m) { System.out.print("2 "); } 13. } Which four code changes, when used together, create a valid JMS message. driven bean? (Choose four.)
10.
Given an EJB 3.0 JMS message. driven bean, which statement is true about its exception handling?