1 Reply Latest reply on Jun 15, 2005 9:10 AM by smeier

    ejbStore() is not called when a new instance is created, onl

      Hi all,

      I have the following problem with JBoss 3.2.7:

      When I create a new instance of an entity bean, it is written to the database without the ejbStore() method being called. I verified this by inserting debug messages in my ejbCreate() and ejbStore() method. As I'm setting the value of one field (called timestam_last_change) in my ejbStore(), my code is not working correctly any more. It worked with JBoss 3.2.1 though.
      Of course I could work around this problem by setting my timestam_last_change in the ejbCreate() method too, but I'm just wondering if this is a bug in jboss or if I misunderstood the meaning of ejbStore. I always thought ejbStore is alway called before the database is updated.

      Any help is greatly appreciated.

      Reguards,
      Stefan

        • 1. Re: ejbStore() is not called when a new instance is created,

          Hi,

          I solved the problem by adding the line

          <call-ejb-store-on-clean>true</call-ejb-store-on-clean>


          to my entity bean container configuration (which is included in the "Standard CMP 2.x EntityBean" configuration by default in jboss 3.2.7, but I used my old standardjboss.xml in which it was missing).

          Best Regards,
          Stefan