The following is the excerpt from Final Release of J2EE specs by Sun Microsystems, Inc. I have made the home methods part bold. Mind you this is not my own writing.
10.6.10 Entity bean�s remote home interface The following are the requirements for the entity bean�s home interface:
The interface must extend the javax.ejb.EJBHome interface.
The methods defined in this interface must follow the rules for RMI-IIOP. This means that their argument and return types must be of valid types for RMI-IIOP, and their throws clauses must include the
java.rmi.RemoteException.
The remote home interface is allowed to have superinterfaces. Use of interface inheritance is subject to
the RMI-IIOP rules for the definition of remote interfaces.
Each method defined in the remote home interface must be one of the following:
� A create method.
� A finder method.
�
A home method. Each create method must be named �create<METHOD>�, e.g. createLargeAccounts. Each
create method name must match one of the ejbCreate<METHOD> methods defined in the enterprise
bean class. The matching ejbCreate<METHOD> method must have the same number and types of its
arguments. (Note that the return type is different.)
The return type for a create<METHOD> method must be the entity bean�s remote interface type.
All the exceptions defined in the throws clause of the matching ejbCreate<METHOD> and ejb-
PostCreate<METHOD> methods of the enterprise Bean class must be included in the throws clause
of the matching create method of the home interface (i.e., the set of exceptions defined for the create
method must be a superset of the union of exceptions defined for the ejbCreate<METHOD> and
ejbPostCreate<METHOD> methods).
The throws clause of a create<METHOD> method must include the javax.ejb.CreateException.
Each finder method must be named �find<METHOD>� (e.g. findLargeAccounts).
The return type for a find<METHOD> method must be the entity bean�s remote interface type (for a
single-object finder), or a collection thereof (for a multi-object finder).
The remote home interface must always include the findByPrimaryKey method, which is always a
single-object finder. The method must declare the primary key class as the method argument.
The throws clause of a finder method must include the javax.ejb.FinderException.
Home methods can have arbitrary names, but they must not start with �create�, �find�, or
�remove�. Their argument and return types must be of valid types for RMI-IIOP, and their throws
clauses must include the java.rmi.RemoteException. The matching ejbHome method speci-
fied in the entity bean class must have the same number and types of arguments and must return the
same type as the home method as specified in the remote home interface of the bean. The remote home interface methods must not expose local interface types, local home interface types,
or the managed collection classes that are used for entity beans with container-managed persistence as
arguments or results.
Even after reading this if you are saying that I am talking nonsense, well! all I can say is "Only ignorant persons say others are ignorant".
Moreover I just don't feel the need to give you sample code(which I have written and tried successfully), I don't see a person willing to learn but just to fight.
Also moderator, could you please close this topic, :roll: I posted this in SCBCD forum and got a better answer from people, who understood the problem in one posting!!!