O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.2. Coding the EJB and test client

4.2.1. The (remote) home interface

As this is a stateless session bean, the home interface is straightforward: It specifies exactly one no-argument create() method. The home interface is shown in Listing 4.1

Listing 4.1. Home interface for the ‘Interest’ EJB.
						package com.kevinboone.ejb_book.interest; 
    import javax.ejb.*; 
    import java.rmi.*; 

 5  /**
						(Remote) home interface for the ‘Interest’ EJB
						(c)2002 Kevin Boone
						*/
						public interface InterestHome extends EJBHome 
10  { 
    /**
						Create an instance of the EJB
						*/
						public Interest create() 
15    throws CreateException, RemoteException; 
    } 

Points to note include the following.

  • The interface extends javax.ejb.EJBHome, as required by the EJB Specification [EJB2.0 7.10.5].

  • The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required