2 Replies Latest reply on Oct 29, 2002 8:01 PM by Markus

    ejbRemove() doesn't remove the bean

    Markus Newbie

      Hi,

      I've tried to delete a CMP2 bean via its ejbRemove-method:


      InitialContext lContext = new InitialContext();
      PersonHome lPersonHome = (PersonHome) lContext.lookup("ejb/address/Person");
      Person lPerson = lPersonHome.findByName(pName);
      lPerson.ejbRemove();

      There is no exception or any other failure, but the bean isn't deleted as well.
      The code for the ejbRemove() in the PersonBean is:


      /**
      * Removes the bean
      *
      * @ejb:interface-method view-type="remote"
      **/
      public void ejbRemove() throws RemoveException
      { }

      So Xdoclet generated the following code in the jaws.xml:


      <ejb-name>address/Person</ejb-name>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>phone</field-name>
      <column-name>PHONE</column-name>
      </cmp-field>
      [...]

      findByName
      <![CDATA[NAME = {0}]]>



      <table-name>Person</table-name>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <row-locking></row-locking>


      I can create the bean, modify it, find it, but I really can't delete it. I'm using Hypersonic database.
      Can someone tell me what's going wrong? Thanks!

      Markus