Java Reference
In-Depth Information
Example 22.4 Sample local interface
package com.jadol.budgetpro;
import javax.ejb.*;
import java.rmi.*;
/**
* Local Interface for the Money EJB
*/
public interface
MoneyLocal
extends EJBLocalObject
{
// the methods which we will call
} // interface MoneyLocal
Example 22.5 Sample local home interface
package com.jadol.budgetpro;
import javax.ejb.*;
import java.rmi.*;
/**
* Local Home Interface
*/
public interface
MoneyLocalHome
extends EJBLocalHome
{
public MoneyLocal
create()
throws CreateException;
} // interface MoneyLocalHome
and a local home interface (Example 22.5). The local interface is in place of the
remote interface and extends EJBLocalObject . The local home interface is in
place of the remote home interface and extends EJBLocalHome .
Why bother? Well, there's no need to marshal and unmarshal all that data
if the calls are staying on the same host. This saves execution time. Perhaps
more importantly, since the arguments don't have to be marshaled and
Search WWH ::




Custom Search