1 Reply Latest reply on May 26, 2003 9:49 PM by mferreg

    ejbPostCreate never called

    mferreg

      I have a CMP bean having a relationship with another bean and I set the relationship field into ejbPostCreate, but that method is never called (I've put a log into that method and never appears).

      I've revised the signature of the method... but is the same that the ejbCreate one:
      public Integer ejbCreate(Integer productID, String name, String description, double basePrice) throws CreateException
      public void ejbPostCreate(Integer productID, String name, String description, double basePrice)

      I also tried to put the CreateException into ejbPostCreate method, but the results are the same.

      I'm using jboss 3.2.0 with tomcat.
      Some ideas about where is the problem?

        • 1. Re: ejbPostCreate never called
          mferreg

          I think I have solved the problem. I post it because perhaps it can help somebody.

          The problem origin was I had an auto-increment pk and I was not storing any information in the pk, so after creation, the ejb reference was lost by jboss, so no ejbpostcreate could be called (I think).

          I've read the comments from http://www.kylev.com/projects/jboss/cmpauto.html, and followed it to allow auto-increment work with jboss and later I've seen ejbPostCreate is called correcty.