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:

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:

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.

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free Mock Exam Engine