Certification
SCBCD
SCBCD Study Notes : Chapter 8 : Entity Beans
SCBCD Study Notes : Chapter 8 : Entity Beans - Page 2SCBCD Study Notes : Chapter 8 : Entity Beans
Please find the Study Notes and resources which covers Chapter 8 : Entity Beans, as part of the Sun Certified Business Component Developer exam CX-310-090.
Chapter 8 : Entity Beans
From a list of behaviors, match them with the appropriate EntityContext method responsible for that behavior.
From a list of behaviors, match them with the appropriate EntityContext method responsible for that behavior.
A CONTAINER provides the entity bean instances with an EntityContext, which gives the entity bean instance access to the instance’s context maintained by the container. The EntityContext interface has the following methods:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface EntityContext extends EJBContext { ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;EJBLocalObject getEJBLocalObject() throws IllegalStateException; ;;;;;;
;;;;;;;EJBObject getEJBObject() throws IllegalStateException; ;;;;;;;;;;;;;;;;
;;;;;;;Object getPrimaryKey() throws IllegalStateException; ;;;;;;;;;;;;;;;;;;
} ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface EJBContext { ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;EJBHome getEJBHome(); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;EJBLocalHome getEJBLocalHome(); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;Principal getCallerPrincipal(); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;boolean isCallerInRole(String roleName); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;UserTransaction getUserTransaction() throws IllegalStateException; ;;;;
;;;;;;;void setRollbackOnly() throws IllegalStateException; ;;;;;;;;;;;;;;;;;;
;;;;;;;boolean getRollbackOnly() throws IllegalStateException;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Identify correct and incorrect statements or examples about an entity bean's primary key and object identity.
From the viewpoint of the Bean Provider, entity objects have a runtime object identity that is maintained by the Container.
The Container maintains the persistent identity of an entity object on the basis of its PRIMARY KEY.
The primary key of an entity bean may or may not be visible as one or more cmp-fields of the instance, depending on the way in which it is specified. Once it has been set, the Bean Provider MUST NOT attempt to change the value of a primary key field by means of a set method on its cmp-fields.
When a new instance of an entity bean whose primary key fields are visible in the entity bean class is created, the Bean Provider MUST use the ejbCreate The container must be able to manipulate the primary key type of an entity bean. Therefore, the primary key type for an entity bean with container-managed persistence MUST follow the rules: There are two ways to specify a primary key class for an entity bean with container-managed persistence:
Next Page: SCBCD Study Notes : Chapter 8 : Entity Beans - Page 2
.
.