[jboss-user] [EJB 3.0] - TO Delete the entire records in a table

mallikarjun_nbsg do-not-reply at jboss.com
Mon Jun 16 06:45:47 EDT 2008


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
Section: 12.2.11
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>

Also I have written the same removeAllRecords() method in the bean class with no body in the method from seeing the above error, but when I ran again still getting the same above error.

Which is the best way to code so to delete all the records of the table.

Please respond asap.

Thank you,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158302#4158302

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158302

More information about the jboss-user mailing list