Pass4itsure > Oracle > Oracle Certifications > 1Z0-860 > 1Z0-860 Online Practice Questions and Answers

1Z0-860 Online Practice Questions and Answers

Questions 4

Given:

11.©Entity 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 about these classes if NO other annotations and mapping descriptors are provided?

A. Class Y must be serializable.

B. ClassYmust be marked as an entity.

C. The entity X is notdefinedcorrectly.The field y must be marked as @Lob.

D. ClassY must be accessedbyapersistenceapplication throughapublicinterface.

Buy Now
Questions 5

An enterprise bean has security permissions set up using declarative security features. Under which two conditions can a client be guaranteed to have permission to invoke a business method on the enterprise bean? (Choose two.)

A. The Application Assembler has marked the enterprise bean methodasunchecked.

B. The client's principalhas beenassigned a securityrolewithpermissionto invokethe method.

C. The Application Assembler has set the security-identity deployment descriptor to run- as.

D. TheApplicationAssemblerhas mapped all security role references using the role-link element.

Buy Now
Questions 6

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;

B. em.persist(order); em.flushO;

C. em.joinTransactionO; em.persist(order);

D. em = emfcreateEntityManagerQ; em.persist(order);

Buy Now
Questions 7

Which statement about entity manager is true?

A. A container-managed entity manager must be a JTA entity manager.

B. An entity manager injected into session beans can use either JTA or resource-local transaction control.

C. An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control.

D. An entity manager obtained through resource injection in a stateful session bean can use a resource-local EntityTransaction for transaction control

Buy Now
Questions 8

Which two statements are true about EJB 3.0 JMS message-driven beans? (Choose two.)

A. The developer can use JMS messageselector declarationsto restrict the messages that the bean receives.

B. The developer can associate the bean with a specific queue or topic using the resource-ref element of the deployment descriptor.

C. To achieve concurrent processing of more than one message at a time, more than one bean class must be associated with the same JMS queue.

D. The developer can usetheactivationConfigelementoftheMessageDrivenannotationto specify whether the bean should be associated with a queue or a topic.

Buy Now
Questions 9

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 the following:

10.©Stateless

II. @Remote(Foo.class)

12.

public class FooBean {

13.

public void workQ throws MyException {

14.

//do some work not shown here

15.

throw new MyException0;

16.}

Assuming there is no deployment descriptor, which statement is true when the workQ method is invoked by a client with an existing transaction context and execution reaches Line 15?

A. The container does notroll back thetransaction.

B. The clientreceives javax.ejb.EJBTransactionRequiredException.

C. The clientreceivesjavax.ejb.EJBTransactionRolledbackException.

D. Thecontainer marks the transactionforrollback by calling the EJBContext.setRollbackOnly method.

Buy Now
Questions 10

A developer is implementing a message-listener method of an EJB 3.0 message-driven bean. The developer wants to make sure that the message receipt is immediately rolled back in case the message listener method is aborted with a runtime exception. Which option can the developer use?

A. Use Container-Managed Transactions with transaction attribute REQUIRED.

B. Use Container-Managed Transactions with transaction attribute NOT_SUPPORTED.

C. Use Bean-Managed Transactions and the JMS API for message acknowledgement.

D. Use Bean-Managed Transactions and write a try-catch-finally block that calls UserTransaction. rollback in case of a RuntimeException.

Buy Now
Questions 11

Which component can use a container-managed entity manager with an extended persistence context?

A. any EJB component

B. only stateful sessionbeans

C. only stateless session beans

D. session beans and web components

Buy Now
Questions 12

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, assuming NO mapping descriptor is used?

A. Entitiesmust extenda persistent base class.

B. Entities must implement the interface PersistentEntityto bemanaged bythepersistent provider.

C. Afield withoutatransient modifier mustbeannotated as ©Persistent to be stored in the database.

D. A field without a transient modifier must be annotated as ©Transient to NOT be stored in the database.

Buy Now
Questions 13

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.

B. The container will ensure that the transaction will never commit.

C. The bean must have started the current transaction for this to be legal.

D. The bean must have bean-managed transaction demarcation for this to be legal.

E. Thebean must have container-managed transaction demarcation for this to be legal.

Buy Now
Exam Code: 1Z0-860
Exam Name: Java Enterprise Edition 5 Business Component Developer Certified Professional
Last Update: May 26, 2026
Questions: 305
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99