0 Replies Latest reply on Nov 26, 2001 11:50 AM by Jacek Wozniak

    Entity Bean's instances

    Jacek Wozniak Newbie


      While developing an application I discovered that JBoss does something strange with the instances of the Entity Beans. I run about 9 client requesting the same data (connected with the same entity in database).All the Entity Bean's are BMP. When the requests gets to JBoss, it's 9 threads call setEntityContext on 9 instances (creating them and putting into a pool I suppose), then on 2 of those instances findByPrimaryKey is called. Later ejbActivate is invoked on the second instance. And here is the point : then 9 threads call ejbLoad parallely on this one activated instance. When the first onet finishes,it calls getData (remote interface method),which executes while the other are still loading data to this instance. I suppose there is something wrong here.
      I don't know if it happens because of the bug in my code, configuration or JBoss's code. Please help.

      Thanks in advance

      Jacek Wozniak