0 Replies Latest reply on Feb 5, 2002 7:45 AM by Andrew Clynes

    Overridden ejbRemove method not always called

    Andrew Clynes Newbie

      I'm using a base class from which all my BMP EJBs are derived, but I cannot guarantee whether the ejbRemove method in the base class or the derived class will be called.

      For example:

      findByPrimaryKey followed by remove always results in the base class being called,

      but...

      findByPrimaryKey followed by some other method (resulting in ejbLoad) followed by remove results in the derived class being called.

      In addition, if the base class's remove method is called, I get a ClassCastException when trying to cast the result of entityContext.getPrimaryKey() despite the fact that the returned object does look like it matches my primary key class.

      Anyone got any ideas what could be going on here?