October 2003
Beginner
734 pages
16h 56m
English
The examples on this page are all legal examples of Remote home interfaces. You’ll see some that could be both stateless and stateful, and some that could be only stateful (because they have a create method with arguments). We’ve dropped the package and import statements to put more on the page.
public interface CartHome extends EJBHome {
public Cart create(String storeID) throws CreateException, RemoteException;
public Cart create() throws CreateException, RemoteException;
}public interface MatcherHome extends EJBHome {
public Matcher create(String customerID) throws CreateException, RemoteException;
public Matcher createNewCustomer(String name, String login)
throws CreateException, RemoteException;
}public interface TicketsHome extends EJBHome {
public Tickets create() throws CreateException, RemoteException;
}public interface ClubHome extends EJBHome {
public Club createExisting(String clubID) throws CreateException, RemoteException;
public Club createNewClub(String clubName) throws CreateException, RemoteException;
}There’s only one interface here that could be a stateless session bean’s home—number 3. Notice, too, that number 4 has two create methods that both have the same argument—a String—but the methods are named differently to reflect what that particular create method is for.

What YOU write:
What the CLIENT sees:
Remember, the ...
Read now
Unlock full access