1Z0-860 Exam Questions
219 real 1Z0-860 exam questions with expert-verified answers and explanations. Page 4 of 5.
- Question #195
An enterprise developer has received ejb-jars from multiple Bean Providers and wants to combine them into a single ejb-jar as well as altering the method permissions on some of the...
- Question #196
Given the following code snippet of an EJB 3.0 entity class: 10.〦ntity 11. @Table(name="ORDERS") 12. public class Orderj.... } A developer wants to change the name of the database...
- Question #197
A developer is writing client code for an EJB 3.0 message-driven bean that is listening on a JMS queue. Which statement is true?
- Question #198
Which statement about message-driven beans is correct?
- Question #199
XYZ Software develops business components using both the EJB 2.1 and EJB 3.0 APIs. Some customers are reluctant to completely migrate to the EJB 3.0 model, but are willing to have...
- Question #200
Which two can be specified by both the Bean Provider and the Application Assembler? (Choose two.
- Question #201
The Java Persistence API defines the semantics of the remove operation and the entity lifecycle states. Which statement is true when the remove method is invoked on an entity X?
- Question #203
A company has a business application that allows end users to order products over the web. A developer in the company wants to add the following capability to the application: When...
- Question #204
Consider the following classes: 11.〦ntity Auction { 12. @ld int id; 13. @OneToOne Item item; 14.} 11.〦ntity Itemj 12. @ld int id; 13. @OneToOne (mappedBy="item") Auction auction; 1...
- Question #205
Which two options can be used to predefine Java Persistence queries for easy use? (Choose two.)
- Question #206
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. Whi...
- Question #208
A developer creates a stateful session bean that is used by many concurrent clients. The clients are written by other development teams and it is assumed that these clients might n...
- Question #212
A developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method: 11. @Aroundlnvoke 12. public Object intercept(lnvocationContext ctx) { 1...
- Question #216
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 responsib...
- Question #218
Which two are true about the Java EE 5 client-view of a message-driven bean? (Choose two.)
- Question #219
Which two statements are true? (Choose two.)
- Question #221
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. T...
- Question #224
Which two statements are correct about EJB 3.0 stateful session beans and stateless session beans? (Choose two.)
- Question #225
Given the following stateful session bean: 10. @Stateful 11. @TransactionAttributefJransactionAttributeType. SUPPORTS) 12. public class VideoBean implements Video { 13. // insert c...
- Question #226
Given the following client-side code that makes use of the session bean Foo: 10. @EJB Foo beanl; 11. @EJB Foo bean2; //more code here 20. booleantestl = beanl.equals(beanl); 21. bo...
- Question #229
A developer writes a stateless session bean with one local business interface and with container- managed transactions. All business methods have transaction attribute REQUIRED. Th...
- Question #230
A developer implements a session bean with a method doStuff which behaves differently depending on the caller's security role. Only users in security roles "ADMIN" and "USER" are a...
- Question #232
Given: 11.〦ntity 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 abou...
- Question #233
A developer creates a stateless session bean. This session bean needs data from a remote system. Reading this data takes a long time. Assume that the data will NOT change during th...
- Question #235
Given: A stateless session bean's business method invokes EJBContext.setRollbackOnly and receives an Illegal StateExe option. Under which of these conditions could this be possible...
- Question #236
Which statement is correct about a Java EE client of a message-driven bean?
- Question #238
A developer needs to deliver a large-scale enterprise application that connects to legacy systems. If the developer chooses an EJB 3.0-compliant application server, which three are...
- Question #240
A developer creates a stateless session bean, EmployeeServiceBean, and its interface, EmployeeSeivice. The session bean uses two annotated entity classes, Employee.class and Depart...
- Question #241
Given: A session bean Foo uses container-managed transactions The container throws a javax.transaction.TransactionRolledBackException when the doStuff methodruns Which transaction...
- Question #242
The Java Persistence entity Lineltem defines a composite primary key that is defined by the two columns ORDERID and LINEITEMID in the database. Which two are true? (Choose two.
- Question #244
EJB 3.0 containers must provide a specific subset of which two APIs? (Choose two.
- Question #245
Given the following code in an EJB 3.0 session bean: 10. @Resource(name="jdbc/employeeDB") 11. private DataSource dataSource; 12. 13. public void lookupEmployee(String id) { 14. In...
- Question #248
A developer creates the following session bean: 10. ©Stateless 11. @RolesAllowed("SECRET") 12. public class MyBean implements Mylnterface { 13. public void methodAOJ} 14. @PermitAI...
- Question #250
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...
- Question #253
A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account: 11.〦ntity 12. @Entityl_isteners(com. acme.AlertMonit...
- Question #255
A developer implemented a Java class called Store. The class is annotated correctly to act as an entity. The developer created a stateless session bean to create, lookup, and remov...
- Question #256
A developer is designing a Java Persistence application that is mapped to a set of existing tables. This set includes table EMPLOYEE, DEPARTMENT, and PROJECT. Tables EMPLOYEE and D...
- Question #257
A CMT session bean named MrBean contains a method storeStuff which is annotated as follows: 22. @TransactionAttributeO"ransactionAttributeType.REQUIRES_NEW) 23. public void storeSt...
- Question #259
A developer implements a session bean which acts as a session facade for an application. This means that clients will only see this session bean's interface which offers the applic...
- Question #261
Given: A session bean Foo uses container-managed transactions The container throws a javax.transaction.TransactionRolledBackException when the doStuff method runs Which transaction...
- Question #262
Within a Java EE environment, which annotation can be used to inject an entity manager factory?
- Question #263
Given this code snippet from a JMS message-driven bean class X: 11. public XQ { System, out. print("1 "); } 12. public void onMessagefMessage m) throws Java. rmi. RemoteException 1...
- Question #264
Consider a deep inheritance hierarchy consisting of Java Persistence entity classes, non-entities, and mapped superclasses. Which statement is correct, assuming NO mapping descript...
- Question #265
Which statement is true about the EJB 3.0 stateful session bean?
- Question #267
A developer writes a stateful session bean with local business interface Bar containing method test. Method test is implemented as 11. ©Remove 12. public void testfj {} A business...
- Question #269
A developer wants to achieve the following two behaviors for an EJB 3.0 session bean: (1) If the client calls a business method with a transaction context, the container will invok...
- Question #273
Which statement about the @MappedSuperclass annotation is correct?
- Question #274
Which two are true about EJB 3.0 exception classes? (Choose two.)
- Question #275
A developer wants to use the Java Persistence query language. Which two are true? (Choose two.)
- Question #276
Consider the following classes: 11.〦ntity Auction { 12. @ld int id; 13. @OneToOne Item item; 14.} 11.〦ntity Itemj 12. @ld int id; 13. @OneToOne (mappedBy="item") Auction auction; 1...