alt
Advertisement
Sponsored links
Certification Series
Online Training
Career Series
Exforsys
Exforsys arrow Certification Series arrow SCBCD arrow SCBCD Study Notes : Chapter 5 : Client View of an Entity (Part 1)
Site Search


SCBCD Study Notes : Chapter 5 : Client View of an Entity (Part 1)
Article Index
SCBCD Study Notes : Chapter 5 : Client View of an Entity (Part 1)
Page 2

.

.

Identify correct and incorrect statements or examples about the client view of an entity bean's local component interface (EJBLocalObject).

A local client can access an entity object through the entity bean’s local [component] interface. An entity bean’s local interface MUST extend the javax.ejb.EJBLocalObject interface. A local interface defines the business methods that are callable by local clients.


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface Account extends javax.ejb.EJBLocalObject { ;;;;;;;;;;;;;;;;;
;;;;;;;void debit(double amount) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;throws InsufficientBalanceException; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;void credit(double amount); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;double getBalance(); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Methods of the entity bean’s local interface MUST NOT throw the java.rmi.RemoteException.

The javax.ejb.EJBLocalObject interface defines the methods that allow the local client to perform the following operations on an entity object’s local reference:

  • Obtain the local home interface for the entity object.
    .
  • Remove the entity object.
    .
  • Obtain the entity object’s primary key.

The CONTAINER provides the implementation of the methods defined in the javax.ejb.EJBLocalObject interface. Only the business methods are delegated to the instances of the enterprise bean class.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface EJBLocalObject { ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;EJBLocalHome getEJBLocalHome() throws EJBException; ;;;;;;;;;;;;;;;;;;
;;;;;;;Object getPrimaryKey() throws EJBException; ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;boolean isIdentical(EJBLocalObject obj) throws EJBException; ;;;;;;;;;
;;;;;;;void remove() throws RemoveException, EJBException; ;;;;;;;;;;;;;;;;;;
} ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Identify correct and incorrect statements or examples about the client view of a entity bean's remote component interface (EJBObject).

A client can access an entity object through the entity bean’s remote interface. An entity bean’s remote interface MUST extend the javax.ejb.EJBObject interface. A remote interface defines the business methods that are callable by remote clients.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface Account extends javax.ejb.EJBObject { ;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;void debit(double amount) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;throws java.rmi.RemoteException, ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;InsufficientBalanceException; ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;void credit(double amount) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;throws java.rmi.RemoteException; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;double getBalance() ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;throws java.rmi.RemoteException; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
} ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

The javax.ejb.EJBObject interface defines the methods that allow the client to perform the following operations on an entity object’s reference:

  • Obtain the remote home interface for the entity object.
    .
  • Remove the entity object.
    .
  • Obtain the entity object’s handle (ONLY REMOTE objects have handles, LOCAL objects DO NOT have handles).
    .
  • Obtain the entity object’s primary key.

The container provides the implementation of the methods defined in the javax.ejb.EJBObject interface. ONLY the BUSINESS methods are DELEGATED to the instances of the enterprise bean class.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface EJBObject extends Remote {;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;EJBHome getEJBHome() throws RemoteException;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;Handle getHandle() throws RemoteException;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;Object getPrimaryKey() throws RemoteException;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;boolean isIdentical(EJBObject obj) throws RemoteException;;;;;;;;;;;;;;
;;;;;;;void remove() throws RemoteException, RemoveException;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

__________________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.


Trackback(0)
Comments (0)add comment

Write comment

busy

 
< Prev   Next >
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape