A developer creates the following session bean:
10.
©Stateless
11.
@RolesAllowed("SECRET")
12.
public class MyBean implements Mylnterface
13.
public void methodAOJ}
14.
@PermitAII
15.
public void methodB0 {}
16.
@DenyAII
17.
public void methodC0 {}
18.}
No deployment descriptor is supplied. Which two statements are true? (Choose two.)
A. A user in the role "SECRET" will be able to access all of the methods.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 EJB 2.1 session beans invoke EJB 3.0 session beans. How should XYZ Software enhance these components to meet this customer requirement?
A. Use @EJBtoinjectareference totheEJB 3.0 businessinterfaceinto the EJB 2.1beanclass.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.Given the following entity class:
11.
@Entity public class Customer)
12.
@ld private int id;
13.
private transient String name;
14.
private Jav
a.
math. BigDecimal grossAmmount;
15.}
Which mapping annotation can be added to the fields of this entity?
A. @Columntothe name fieldA 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, CalculateDiscount, is implemented as a stateless session bean and runs on a different server. ShoppingCart contains the method getTotalPrice, which calculates the total price of the order in the ShoppingCart, including discounts. Discounts are calculated by CalculateDiscount using the information on the ShoppingCart bean, combined with data from a database. Which scenario can accomplish this?
A. The CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean passing the this reference.Given :
9. @Stateful
10. @TransactionManagement(TransactionManagementType. BEAN)
11. public class FacadeBean implements Facade { 12 @EJB Business business;㏑esource SessionContext ctx;
13. public void startStuff0 throws Exception {
14. ctx.getUserTransactionQ.beginO;
15. business. doA0;
16. business. doBQ;
17.}
18. public void endStuff0 throws Exception {
19. ctx.getUserTransactionO.commit0;
11. ©Stateless
12. public class BusinessBean implements Business { 13.©Resource SessionContext ctx;
14. public void doAO { ctx.setRollbackOnlyQ; }
15. @TransactionAttributeO"ransactionAttributeType.REQUIRES_NEW)
16. public void doBQj}
A client calls startStuff and endStuff subsequently. Assuming NO other transaction- related metadata, which two statements are correct? (Choose two.)
A. MethoddoB isnevercalled.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.)
A. Lineltem must define a primary key class to represent the composite primary key.A developer has created an application-managed entity manager. Which statement is correct?
A. A new persistence context begins when the entity manager is created.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 code fragments can be used on Line 22 to persist an order instance assuming that all references are properly initialized? (Choose two.
A. em.merge(order); em.flushQ;A developer examines a list of potential enterprise applications and selects the most appropriate technologies to use for each application. For which two applications is EJB 3.0 an appropriate solution? (Choose two.)
A. torenderaGUI for mobile clientsNowadays, 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.