1Z0-898 Exam Questions
63 real 1Z0-898 exam questions with expert-verified answers and explanations. Page 1 of 2.
- Question #1
The developer has defined the following entity class office: Which of the following attributes will be in corresponding generated static metamodel class for the rooms' field?
- Question #2
Given two entities with many-to-many bidirectional association between them: What set of annotations correctly defines the association?
- Question #3
An application wants to utilize side effects of cascading entity manager operations to related entities. Which statement is correct?
- Question #4
The Contact Information embeddable class contains address information as well as a reference to a phone entity. The ContactInformation class is defined as follows: @Embeddable publ...
- Question #5
A stateless session bean's business method invokes EJBContext.setRollBackOnly and receives an IllegalStateException. Under which of these conditions could this be possible?
- Question #6
Given the following stateless session bean implementation classes: Assuming no other transaction-related metadata, what are the transaction attributes on methodB, and method C resp...
- Question #7
A session bean business method throws an exception during execution. Which two are responsibilities of the Bean Provider when throwing the exception? (Choose two.)
- Question #8
FooBean and BarBean are both EJB 3.0 stateless beans with container-managed transaction demarcation. All business methods in FooBean have transaction attribute REQUIRED, and all bu...
- Question #9
Given a set of CMT bean methods with the following transaction attributes: Method M1 = SUPPORTS Method M2 = REQUIRED Method M3 = NOT_SUPPORTED Method M4 = REQUIRES_NEW And the foll...
- Question #10
Which EntityManager API will lock entity x with a pessimistic lock?
- Question #11
It a Persistence application locks entity x with a pessimistic lock, which statement is true?
- Question #12
If a Persistence application locks entity x with a LockModeType.OPTIMISTIC_FORCE INCREMENT lock type, which statement is true?
- Question #14
A user entity is retrieved in a query and stored in an instance variable user. The user entity has a single valued name property that uses the mapping defaults, and a photo propert...
- Question #15
Given the following entity classes: @Entity @cacheable (true) Public class A { . . . } - - - - @Entity @cacheable (false) Public class B { . . .} @Entity Public class C { . . . } I...
- Question #16
An application has three entities: the mapped super class person class entity, and the parent and child entities, which are subclasses of person. The application has created four e...
- Question #17
A developer wants to ensure that an entity's data is up-to-date with regard to the database. Which of the following statements is guaranteed to accomplish this?
- Question #18
The developer wants to write a criteria query that will return the number of orders made by customer of each county. Assume that customer is an entity with a unidirectional one-to-...
- Question #19
The developer wants to write a portable criteria query that will order the orders made by customer James Brown according to increasing quantity. Which one of the below queries corr...
- Question #20
An application has two entities, parson and Address. The application calls the DeletePersonsByStatus named query. Which of the following is true?
- Question #21
An application uses optimistic locking by defining version attributes in its entity classes. The application performs a bulk update of the entities using a JPQL query. Which of the...
- Question #22
A named query that sets an exclusive pessimistic on the entities returned by the query by setting the NamedQuery lockMode element to LockModeType.PESSIMISTIC_FORCE_INCREMENT. The a...
- Question #23
A developer wants to create a Java Persistence query that will include a sub-query. Which three are true? (Choose three.)
- Question #24
Which statement is correct about the Java Persistence API support for the SQL queries?
- Question #25
A user entity is in a one-to-many relationship with a Book entity. In other words, a developer reach the collection of books that a user instance myUser has by using the path expre...
- Question #26
A session bean business method invokes UserTransaction.setRollbackonly and receives an IllegalStateException. Under which circumstance can this happen?
- Question #27
A JavaEE application is packaged as follows. Which of the following is true for a portable JavaEE application?
- Question #28
The developer has modeled student interests as a set <String>: @Entity public class Student { @Id int student Id; string name; @ElementaryCollection Set <String> Interests; . . . }...
- Question #29
The embeddable class ContractInformation is used in an element collection of the Employee entity. @Entity Public class Employee { @Id int empId; @ElementaryCollection Set <Contract...
- Question #30
If a Persistence application locks entity x with a pessimistic lock, which statement is true?
- Question #31
Entity lifecycle call-back methods may be defined in which three classes? (Choose three)
- Question #32
A developer wrote an entity class with the following method: Private static Logger logger = Logger.getLogger ("myLogger"); @PrePersist @PreUpdate Public void doA () { Logger.info (...
- Question #33
Given the following code: Public void create () { try { doA () { } catch (PersistenceException e) {} try (doB) (); } catch (PersistenceException e) {} } Calling method doA will cau...
- Question #34
An application that uses pessimistic locking calls an update Data method that results in a LockTimeoutException being thrown. What three statements are correct? (Choose three)
- Question #35
A developer has created a deep entity class hierarchy with many polymorphic relationships between entitles. Which inheritance strategy, as defined by the inheritance Type enumerate...
- Question #36
A developer is creating an entity which is mapped to a table that has a primary key constraint defined on two character columns and would like to use mapping defaults as much as po...
- Question #37
A developer wants to model the grades for a student as a Map<course, integer>. Assume that Student and Course are entitles, and that grades are modelled by integers. Which of the f...
- Question #38
Consider a persistence application with the following orm.xml: What will be the effect of the above orm.xml?
- Question #39
A developer has created an application managed entity manager. Which statement is correct?
- Question #40
Given: Which statement is correct?
- Question #41
If an application uses an extended persistence context, which of the following is true?
- Question #42
An application uses an application-managed entity manager. Which of the following is NOT true?
- Question #43
An application that uses container-managed transaction demarcation creates a query within an active transaction and receives a QueryTimeoutException. Which of those scenarios descr...
- Question #44
Given two entities with one to-one association: Which code fragment correctly defines the detail field that PersonDetail instance in removed if the person instance that references...
- Question #45
An entity person is mapped to a table PERSON and has a collection-valued persistence field otherUsedNames that stores names used by a person. The other used Names field is mapped t...
- Question #46
Which statement is true about the @OrderColumn annotation?
- Question #48
The developer wants to define a unidirectional relationship from the customer entity to the order entity and map this relationship using a foreign key mapping strategy. Which one o...
- Question #49
A developer who is designing entity classes to map a legacy database encounters a table called STUDENT_RECORD . This table has two columns, STUDENT_ID and STUDENT_INFO_ID. The prim...
- Question #50
The developer is creating a Java Persistence model for a legacy database. The database contains customer and subscriptions. The subscriptions table has a foreign key to the Custome...
- Question #51
Refer to the Exhibit. A developer wants to have booking data stored in the table BOOKING, flight number in table FLIGHTBOOKING, and hotel name in HOTELBOOKING. Which code, inserted...
- Question #52
Which two of the following statements are true of embeddable classes? (Choose two)