Vcehome > Oracle > Others 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.

Browse 305 Q&As
Questions 5

A developer wants to create a Java Persistence query to perform a bulk update operation on five different entity classes. All of these classes have a field called name. These classes have the following relationships: Harrier extends Dog and Dog extends Animal Vet extends Doctor What is the minimum possible number of operations required to change the value of the name field for all of the entities in all five classes?

A. 1

B. 2

C. 3

D. 4

E. 5

Browse 305 Q&As
Questions 6

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.

Browse 305 Q&As
Questions 7

Which statement is true about the use of a persist operation in a transaction?

A. If a user persists a detached object it always becomes managed.

B. The persist operation on an entity always cascades to its related entities.

C. If a user persists a new entity with an existing primary key the transaction will fail.

D. If a user persists a managed entity an exception may be thrown by the persist operation.

Browse 305 Q&As
Questions 8

Session bean A is a client of session bean B. Bean A is using container-managed transactions and Bean A invokes a business method of bean B. Under which two circumstances does bean A know for certain that continuing the transaction is fruitless? (Choose two.)

A. Bean A receives an application exception.

B. Bean Areceives ajava.rmi.RemoteException.

C. Bean A's invocationofUserTransaction.getStatus returnsfalse.

D. Bean A's invocation of EJBContext.getRollbackOnly returns true.

E. Bean Areceives ajavax.ejb.EJBTransactionRolledbackException.

Browse 305 Q&As
Questions 9

A Java Persistence application uses the EntityManager.flush method to synchronize the current persistence context with the database. Which two statements are correct? (Choose two.)

A. The flush method might cause the persist operation to be cascaded to related entities.

B. Extensive use of the flush method decreases the performance of a Java Persistence application.

C. The flush method should be used to synchronize the current persistence context with modifications made in other transactions.

D. The flush method should be used to publish changes done in the current persistence context to other transactions before actual transaction commit.

Browse 305 Q&As
Questions 10

A developer is declaring a persistent entity that will be passed as a detached object through a remote interface to an application client. Which two characteristics must the corresponding persistent entity class have? (Choose two.)

A. implement serializable

B. includeano-arg constructor

C. make instance variables public

D. implement the remote interface

Browse 305 Q&As
Questions 11

A developer wants to use the Java Persistence query language. Which two are true? (Choose two.)

A. A WHERE clause is required in every query.

B. The WHERE clause can restrict the scope of a delete operation.

C. The WHERE clause can be used to order the results returned by a query.

D. The WHERE clause is used to determine the types of objects to be retrieved from a persistent store.

E. The WHERE clause is used to restrict the contents of a collection of objects that are returned from a query.

Browse 305 Q&As
Questions 12

Consider the following classes: 11.©Entity Auction {

12.

@ld int id;

13.

@OneToOne Item item;

14.}

11.©Entity Itemj

12.

@ld int id;

13.

@OneToOne (mappedBy="item") Auction auction;

14.

}

Given that the Auction entity maps to an AUCTION database table and the Item entity maps to an ITEM database table, which statement is correct assuming there is NO mapping descriptor?

A. The relationship is mapped to a foreign key in the ITEMtable.

B. Therelationship is mapped usingajointableAUCTIONJTEM.

C. The relationship is mappedtoaforeignkeyinthe AUCTIONtable.

D. The relationshipis mapped to foreignkeysinbothITEMandAUCTION tables.

Browse 305 Q&As
Questions 13

A developer is declaring a persistent entity that will be passed as a detached object through a remote interface to an application client. Which two characteristics must the corresponding persistent entity class have? (Choose two.)

A. implement serializable

B. includeano-arg constructor

C. make instance variables public

D. implement the remote interface

Browse 305 Q&As
Exam Code: 1Z0-860
Exam Name: Java Enterprise Edition 5 Business Component Developer Certified Professional Exam
Last Update: May 09, 2024
Questions: 305 Q&As

PDF

$49.99

VCE

$59.99

PDF + VCE

$67.99