2 Replies Latest reply on Feb 9, 2004 11:29 AM by Norton

    Entity bean lost its data

    Norton Newbie


      I have a weird problem that I hope someone can help me with. I have a BMP entity bean that represents a db table in our system. It is a really simple table of only three columns, so there are only three properties in the EJB.

      We have a servlet that gets called to create rows in the database using the EJB home interface create() method. A jsp page can then be opened to see what was inserted in the database. The primary keys are retrieved in a separate page and passed to the display page where a findByPrimaryKey() is called. Our problem is that somewhere between the servlet call and the display page, the EJBs lose their data. All the properties in the EJB are null or 0.

      I put debugging in the EJB method calls and, as expected, the ejbFindByPrimaryKey() and ejbLoad() methods are not executed by the jsp page. The ejbLoad() is called after the create.

      Any idea how/why the EJB would lose its data?

      I'm running JBoss 3.0.6 on RH 7.3 and MySQL 4.0.12.

      Thanx in advance.