SCBCD Tutorials
Certification
SCBCDSCBCD Study Notes : Chapter 2 : Client View of a Session Bean
Table of Contents
SCBCD Study Notes : Chapter 2 : Client View of a Session Bean
SCBCD Study Notes : Chapter 2 : Client View of a Session Bean - Page 2SCBCD Study Notes : Chapter 2 : Client View of a Session Bean - Page 2
2. Identify correct and incorrect statements or examples about the client view of a session bean's local and remote component interfaces.
A client NEVER DIRECTLY accesses instances of the session bean’s class. A client always uses the session bean’s COMPONENT interface to access a session bean’s instance. The class that implements the session bean’s component interface is provided by the container.
A session EJBObject supports:
The business logic methods of the object. The session EJBObject delegates invocation of a business method to the session bean instance.
- Get the session object’s remote home interface.
. - Get the session object’s handle.
. - Test if the session object is identical with another session object.
. - Remove the session object.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
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;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
A session EJBLocalObject supports:
- The business logic methods of the object. The session EJBLocalObject delegates invocation of a business method to the session bean instance.
. - Get the session object’s local home interface.
. - Test if the session object is identical with another session object.
. - Remove the session object.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
public interface EJBLocalObject { ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;EJBLocalHome getEJBLocalHome() throws EJBException; ;;;;;;;;;;;;;;;;;;;
;;;;;;;Object getPrimaryKey() throws EJBException; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;boolean isIdentical(EJBLocalObject obj) throws EJBException; ;;;;;;;;;;
;;;;;;;void remove() throws RemoveException, EJBException; ;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Method getPrimaryKey() on session bean will throw EJBException (local SB) or RemoteException (remote SB) because session bean does not have primary key.
EJBObject interface extends Remote (marker) interface.
__________________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.
First Page: SCBCD Study Notes : Chapter 2 : Client View of a Session Bean
