Java Reference
In-Depth Information
public Cost
debt(double amt, double rate, double paymnt)
throws java.rmi.RemoteException
{
return SAMoney.debt(amt, rate, paymnt);
} // debt
public void
setSessionContext(SessionContext context)
{
sessionContext = context;
} // setSessionContext
public void
ejbCreate() { }
public void
ejbRemove() { }
public void
ejbActivate() { }
public void
ejbPassivate() { }
} // interface MoneyEJBean
EJBObject
22.2.2
At the other end of the chain of EJB objects used to accomplish all this distribut-
ed computing is the object that our application is actually going to touch.
When our application creates an EJB, it, acting as a client, won't actually get
its hands on the distant session (or entity) bean because that session bean is
running somewhere out in the network. There will be, however, a proxy object,
acting on behalf of the distant EJB. It is described as the remote interface , be-
cause it is remote from the EJB (though very close to the application). It is an
interface because J2EE supplies a class that does the hidden work of marshaling
the data, contacting the EJB, sending the data and receiving the results; the
application developer only adds a few additional application-specific methods,
via this interface (Example 22.2).
Search WWH ::




Custom Search