There were couple of questions in Enthuware MOCK which I think was wrong.
Identify the true statements regarding transactions in
EJB 3.0.
1. It allows Isolation levels to be specified in the deployment descriptor.
2. It allows Isolation levels can only be used programmatically using proprietary database vendor interface.
3. It allows nested transactions.
4. It does not allow a EJB 3.0 Entities to manage their own transactions.
The answer to this was 2, 4.
Why is 3 not the correct answer, as it does allow for Nested Transaction. For example, Required-Required New
II)
Identify the correct statements about the primary key of an entity?
In an entity class hierarchy, the class for which the primary key has been defined must be the root class of the hierarchy and must be an Entity class.
What do you mean by root class?
III)Which of the following tasks would an application assembler perform?
1. Specify the resource manager connection factory references in the deployment descriptor.
2. Configure a resource manager factory.
3. Bind a resource manager connection factory reference used by a bean to actual resource factory.
4. None of these
The answer to this was none of these.
The answer should have been 1. As the role of bean provider & application assembler could be considered as same.
IV)
Which of the following statements are correct regarding a class hierarchy of Entity classes?
1. The primary key must be defined on the entity that is the root of the entity hierarchy or on a mapped superclass of the entity hierarchy.
2. The primary key must be defined exactly once in an entity hierarchy
3. There can be only one @MappedSuperclass class in a hierarchy and it must be the root class of the hierarchy.
What is the difference between -> Root of entity hierachy & root class of hierarchy?
Thanks