A stateful session bean contains a number of instance variables. The types of instance variables A and B are NOT serializable. Instance variable B is a complex type which is populated by many business calls, and can, therefore, NOT be refilled by the client without starting all over. A helper instance variable C is defined as having a Serializable type, and can hold all the information which is in variable B. For example, B is of type XML-DOM Tree and C of type String. Which two solutions, when combined, maintain the state of the session bean over a passivation and activation by the container? (Choose two.)
A. The value of helper variable C is used to create the value ofinstancevariableBin the beans noarg constructor.Given a stateless session bean with container-managed transaction demarcation, from which two methods can a developer access another enterprise bean? (Choose two.)
A. beanconstructorA developer is writing client code for an EJB 3.0 message-driven bean that is listening on a JMS queue. Which statement is true?
A. The transaction context of the client is propagated to the bean.Given the method invocation sequence:
Method 1 calls Method 2 Method 2 calls Method 3 Method 1 calls Method 4 And the transaction scope:
Method 1Transaction A Method 2Transaction A Method 3Transaction A Method 4Transaction B Assuming Method 1 is invoked by a client without an existing transaction context, which set of transaction attributes will support this scope?
A. Method1NEVER Method 2SUPPORTS Method 3REQUIRED Method 4REQUIRES_NEWGiven:
A session bean Foo uses container-managed transactions The container throws a javax.transaction.TransactionRolledBackException when the doStuff method runs. Which transaction attribute can the doStuff method have for this to occur?
A. NEVERWhich example of Java Persistence identity definitions is portable and correct assuming NO mapping descriptor is present?
A. ©Entity public class A { @ld private float id; // more code here }Which is a correct way of defining a runtime exception as an EJB 3.0 application exception?
A. public class MyAppException extends javax.ejb.EJBExceptionA developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method:
11.
@Aroundlnvoke
12.
public Object intercept(lnvocationContext ctx) {
13.
return "intercepted";
14.}
Foolnterceptor is applied to a business method in a stateless session bean:
11.
@lnterceptors(Foolnterceptor.class)
12.
public String testzero(int i) {
13.
return (i == 0) ? "zero""not zero";
14.
}
Which describes the result when a client invokes the test zero method with a value of 1?
A. The intercept method is NEVER invoked.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, 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.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 this application it is essential to quickly determine which company a department belongs to and to also easily access all departments of a given company. Which two declarations provide a solution to these requirements? (Choose two.)
A. In class Department @ManyToOne private Company company;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.