3 Replies Latest reply on Apr 16, 2004 6:47 AM by Petter Ahlgren

    Jboss reuse the EJB java object

    Petter Ahlgren Newbie


      When I moved from 3.2.1 to 3.2.3 I got a problem with my BMP entity beans.

      In 3.2.3 jboss seems to reuse the java object for different entity beans.
      The result is that the values of member variables is transfered from one entity bean to another.

      I tested it by adding an member variable to my bean.
      int count = 0;
      and the following code was added to ejbCreate and ejbLoad.

      Now I could see that in 3.2.3 the value of count was increased but in 3.2.1
      it was always 1.

      Should it really work like this ?

      If so I have to add some code that resets all variables before I do anything else in ejbCreate and ejbLoad.