SampleHomeという名前のインタフェースを設定した場合の例を以下に示します。
package Sample; import javax.ejb.*; import java.rmi.RemoteException; import java.util.*; public interface SampleHome extends EJBHome { /* createメソッドの定義 */ public SampleRemote create(Integer code, String name, String desc ) throws CreateException, RemoteException; /* findByPrimaryKeyメソッドの定義 */ public SampleRemote findByPrimaryKey(SampleBeanPrimaryKey primaryKey) throws FinderException, RemoteException; /* find<METHOD>メソッドの定義 */ public Enumeration findSampleBigCode(Integer bigcode) throws FinderException, RemoteException; /* find<METHOD>メソッドの定義 */ public Collection findSampleByName(String name) throws FinderException, RemoteException; }