My scenario is delete to entire records from a table, which is the best way to code in CMP bean, I am using EJB2.0 version. I declared my own method removeAllRecords() in the home interface and given a query in the ejb-jar.xml, but on executing the same I am getting deployment error as below:
Bean : RCVlanMacTableHome
Method : public abstract void removeAll() throws EJBException, RemoveException
Warning: Each local home method must match a method defined in the entity bean class.
code in ejb-jar.xml:
<query> <description></description> <query-method> <method-name>removeAllRecords</method-name> <method-params/> </query-method> <ejb-ql>Delete OBJECT(g) From rcVlanMacTable g</ejb-ql> </query>
I think the error says that the problem is that you hasn't declared the method removeAll() in the local home interface or in the entity class, it doesn't refer to the ejb-jar.
On the other hand, maybe you haven't noticed that in the ejb-jar is declared as removeAllRecords() and in the error is shown as removeAll().