1 Reply Latest reply on Dec 11, 2001 7:40 AM by vincent

    JBoss reset data between two method calls. What's have been

    hrangamana

      Hi all,

      I have a BMP wich i developped using jboss 2.2.1. I use commit option A. Everything works just well under 2.2.1... But nightmare started when i upgraded my server into 2.4.3!
      Here is the scenario :
      i call findPrimaryKey from within another bean. ejbFindPrimaryKey initialize a member value. I check this value at the end of the method and it's Okay. But when i print the same value in ejbActivate, jBoss prints out the default value .. So sometimes between the call ejbFindByPrimaryKey and ejbActivate, data member are set to their default value ... but i can't figure out, where this could have happenned ? Have i miss configuration changes between 2.2.1 and 2.4.3??? Cause the code werk pretty well on 2.2.1

      Please help ... it's really a blocking problem on our project.

      Thanx.

      --Hermann

        • 1. Re: JBoss reset data between two method calls. What's have b
          vincent

          findBPK is an home method that operates on one instance of the entity bean.
          ejbActivate will operate on another instance.
          You can not pass value from a home method to an instantiated bean.
          Say differently, home calls can not "remember" anything.
          Have a look at Fat Key pattern on theserverside, it is the solution for your problem : put state in the PK that is return by the FBPK, get it from getPrimaryKey() method on EntityContext inside ejbLoad