1Z0-860 Exam Questions
219 real 1Z0-860 exam questions with expert-verified answers and explanations. Page 1 of 5.
- Question #1
An enterprise developer needs to modify the order of interceptor method execution specified by the Bean Provider, but does NOT have access to the bean's source code. No deployment...
- Question #2
A developer writes a session bean which uses several configurable constants. The constants are all defined as String types in JNDI. This cannot be changed because existing code is...
- Question #3
A developer has created an application-managed entity manager. Which statement is correct?
- Question #4
Given this Java EE application that uses a JTA application-managed entity manager: 20. UserTransaction utx = ...; 21. utx.beginQ; 22. // insert code here 23. utx.commitQ; Which two...
- Question #5
A developer writes two session beans which cooperate. The first session bean, ShoppingCart, collects orders and is implemented as a stateful session bean. The second session bean,...
- Question #6
A CMT session bean named MrBean is annotated as follows : 21. @Stateless(name="MrBean") 22. @TransactionAttribute0"ransactionAttributeType.NOT_SUPPORTED) 23. public class MrBean {...
- Question #7
Which four are defined in the EJB specification as a standard EJB role? (Choose four.
- Question #8
The syntax of the ORDER BY clause is defined in the Java Persistence API asorderby_clause ::=ORDER BY orderbyjtem {, orderbyjtem}* Which statement is correct about the use of ORDER...
- Question #9
A developer is writing implementation code for an EJB 3.0 message-driven bean class that processes booking requests. Within the business logic of the onMessage method, a temporary...
- Question #10
Given a set of CMT bean methods with the following transaction attributes: Method M1=SUPPORTS Method M2=REQUIRED Method M3=NOT_SUPPORTED Method M4=REQUIRES_NEW And the following me...
- Question #11
OldBarBean is a stateless session bean written to the EJB 2.1 API with remote home interface. OldBarHome and remote component interface OldBar. FooBean is a stateless session bean...
- Question #12
Which statement is true about the primary key of a Java Persistence entity?
- Question #15
A Java Persistence application uses a Version attribute to manage concurrent updates. Which is true?
- Question #16
A developer writes a stateful session bean FooBarBean with two local business interfaces Foo and Bar. The developer wants to write a business method called getBarfor interface Foo...
- Question #17
Which statement about the combination of mapping defaults, annotations, and XML descriptors is correct?
- Question #19
Given code snippets from two files: 7. public class Dog { 8. public void onMessage(Message m) { System, out. print("1 "); 9. 1 And 10. @MessageDriven 11. class MessageDog extends D...
- Question #21
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 #22
FooBean is an EJB 3.0 session bean that can make valid use of UserTransaction. Which is guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?
- Question #23
An Application Assembler is given the following stateless session bean: 10. ©Stateless public class MyBean implements Mylnt { 11. @RolesAllowed("SECRET") 12. public void methodA(in...
- Question #24
A deployer is given the following session bean: 10. ©Stateless 11. @RolesAllowed("BATH") 12. @DeclareRoles("SOAP") 13. public class ShowerBean implements Shower { 14. public void p...
- Question #26
Which statement is true about the Timer service in an EJB 3.0 stateless session bean?
- Question #27
Which is a valid way of injecting a container-managed transaction-scoped persistence context into an EJB 3.0 session bean assuming the application contains only one persistence uni...
- Question #29
Given the following entity class: 11. @Entity public class Customer) 12. @ld private int id; 13. private transient String name; 14. private Java. math. BigDecimal grossAmmount; 15....
- Question #32
A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. So...
- Question #33
A developer wants to implement a relationship between Company and Department entity classes. Every department belongs to one company, and one company has several departments. In th...
- Question #35
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 #36
You have been asked to develop business methods for an enterprise bean to fulfill the following objective: If the JDBC connection is NOT available, the current state of the shoppin...
- Question #37
A developer is creating an entity which is mapped to a table that has a primary key constraint defined on two character columns and would like to use mapping defaults as much as po...
- Question #39
A developer creates the following session bean: 10. ©Stateless 11. @RolesAllowed("SECRET") 12. public class MyBean implements Mylnterface 13. public void methodAOJ} 14. @PermitAII...
- Question #40
Given a stateless session bean with container-managed transaction demarcation, from which two methods can a developer access another enterprise bean? (Choose two.
- Question #42
Which two statements about the EJBContext. Is CallerlnRole method are correct? (Choose two.)
- Question #43
According to the Java Persistence API, a managed entity instance X becomes removed by invoking the remove method on it or when it is a target of a cascaded remove operation. Which...
- Question #45
Given two entities with a many-to-many bidirectional association between them: 11. @Entity public class Employee! 12. Collection projects; 13. // more code here 14.} and 11.〦ntity...
- Question #47
A business method of a stateless session bean with a transaction attribute REQUIRED executes a Java Persistence query on a container-managed persistence context. Under which two co...
- Question #49
A session bean's business method invokes User Transaction.set Rollback Only and receives an HlegalStateException. Under which circumstance canthis happen?
- Question #50
Given the following entity class: 11. @Entity public class Customer) 12. @ld private int id; 13. private transient String name; 14. private Java. math. BigDecimal grossAmmount; 15....
- Question #51
Which two statements are true about EJB 3.0 JMS message-driven beans? (Choose two.)
- Question #52
A developer wants to create a Java Persistence query that returns valid U.S.phone numbers (formatted as "123-456-7890" or "800-RUN-EJB3") from a collection of differently formatted...
- Question #54
Given: 10. ©Stateless 11. @RunAs("X") 12. public class SecureBeanOl implements SecureOl { 13. @EJB Secure02 secure02; 23. @RolesAllowed("A") 24. public void methodA0 { 25. secureO2...
- Question #55
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 #56
A developer is writing a stateless session bean that is obtaining a transaction-scoped entity manager using injection and assumes the application defines one persistence unit. Whic...
- Question #57
The Java Persistent API defines certain rules for persistent entities. These rules are required by the persistent provider to manage entities at runtime. Which statement is correct...
- Question #58
Which statement is correct about the Java Persistence API support for the SQL queries?
- Question #59
Which two are restrictions of beans with bean-managed transactions? (Choose two.)
- Question #60
Given two entities with a many-to-many bidirectional association between them: 11. @Entity public class Employee! 12. Collection projects; 13. // more code here 14.} and 11.〦ntity...
- Question #61
A developer is implementing an EJB 3.0 message-driven bean that will be associated with a JMS topic. The bean must NOT miss any messages published to the topic, even if the EJB ser...
- Question #62
Which two can be specified by both the Bean Provider and the Application Assembler? (Choose two.)
- Question #63
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 #64
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 Fred1or 'Ginger', and writes the following J...
- Question #65
Given : public class MyException extends Exception {} The business interface Foo declares a method work0: I.public void work0 throws MyException; The bean class FooBean contains th...