0 Replies Latest reply on Apr 30, 2002 1:37 PM by Lars Bergmann

    2.4.5RC1: Two pool-instances activated for one CMP-instance?

    Lars Bergmann Newbie

      I am experiencing a problem with an entity state not synchronized properly:

      CMP-entity ("Product"; commit option A) is first created and
      then called (findByPrimaryKey/getter/setter) multiple times from different clients.

      There are two physical instances from the pool (A and B) serving
      the requests for one proxy:

      /************************************************************/

      1. Upon creation of the Product instance,
      this invocation sequence is called on pool-instance A:

      ejbCreate()
      ejbPostCreate()
      ejbStore()


      2. Upon lookup (from SLSB, in-VM) of this Product instance,
      this invocation sequence is called on pool-instance B:

      ejbActivate()
      ejbLoad()

      Now we have two activated instances for one primary key.


      3. A setter-call (within tx) is invoked on pool-instance B:

      setTest(test)
      ejbStore()


      4. A further lookup and getter is invoked on pool-instance A:

      getTest() returns NULL

      (database properly synced from 3.)

      /************************************************************/


      Is this by design? Access to an entity instance is supposed to be synchronized,
      so what´s the reason for activating multiple pool-instances for one entity instance
      at the same time? I expect an unused instance to be passivated and returned to the pool?


      Thanks,

      Lars