Consider a deep inheritance hierarchy consisting of Java Persistence entity classes, non- entities, and mapped superclasses. Which statement is correct, assuming NO mapping descriptor is present?
A. An entity class must NOT inherit from a non-entity class.A developer writes a stateless session bean FooBean and uses its deployment descriptor to declare a local ejb dependency on a stateful session bean in the same ejb-jar.
Which environment annotation, when declared within the FooBean bean class, is equivalent to the ejb-local-ref shown above?
A. @EJB(beanName="BarBean") private acme. Bar barRef;Which two annotations can be applied at the class, method, and field levels? (Choose two.)
A. @EJBB. @lnitOldBarBean 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 written to the EJB 3.0 API. OldBarBean and FooBean are the only EJBs packaged in the ejb-jar. The FooBean portion of the ejb-jar. xml also declares an ejb-ref whose ejb-ref-name is ejb/oldBar. The ejb-ref is linked to OldBarBean. There are no other ejb dependencies defined. A business method foo in FooBean needs to access OldBarBean. Which is portable code to achieve this goal?
A. ©Remote private OldBar oldBar;FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed transaction demarcation. All business methods in FooBean have transaction attribute REQUIRED, and all business methods in BarBean have
transaction attribute REQUIRES_NEW. The business method foo in FooBean invokes the business method bar in BarBean.
Given:
10.
public class BarBean {
11.
public void bar0{
12.
throw new RuntimeException("unexpected error..."); 13.}
Which is true about the result of this method invocation assuming execution reaches Line 12?
A. FooBean.foo method receives javax.ejb.EJBException.An application wants to utilize side-effects of cascading entity-manager operations to related entities. Which statement is correct?
A. The persist operation is always cascaded to related entities for one-to-one and one-to- many relationshipsGiven 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
13.
try {
14.
TextMessage tm = (TextMessage) m;
15.
String text = tm.getText0;
16.
System, out. print("2 ");
17.
} catch (JMSException e) {
18.
throw new java. rmi. RemoteExceptionQ;
19.}
20.}
When this bean class handles a message, which is correct?
A. After a messagedelivery theresultis1.Which statement about the @MappedSuperclass annotation is correct?
A. A class annotated with @MappedSuperclass must be abstract.The Java Persistence API defines the Query interface. Which two statements about the Query.executeUpdate method are true? (Choose two.)
A. Itmust always be executed within a transaction.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 that returns a Bar reference to the same session bean identity on which the client invokes getBar. Which code, when inserted on Line 12 below, implements the getBar method with the wanted behavior?
10.
©Resource SessionContext sessionCtx;
11.
public BargetBarOJ
12.
13.}
A. return(Bar)this;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.