2 Replies Latest reply on Jun 26, 2002 4:14 PM by marsden

    Getter method call of CMP entity hanging

    marsden

      I am getting this problem consistently. I making this call hundreds of time in other place. The call just hangs and later times out. Code:

      LocalScenarioHome home = (the local home interface)

      Collection coll = home.findAllByUserID(userName);

      if(coll == null)
      return null;

      Iterator enum = coll.iterator();

      if(!enum.hasNext()) {
      return null;
      }

      while (enum.hasNext()) {
      LocalScenario scen = (LocalScenario)enum.next();
      System.out.println("HAVE SCENARIO: " + scen);
      System.out.println("HAVE SCENARIO NAME: " + scen.getName());

      .
      .
      .

      The HAVE SCENARIO output shows that there is an object of the type I expect but the next line hangs.

      Thanks

        • 1. Re: Getter method call of CMP entity hanging
          dsundstrom

          What do you mean by "times out." Are you getting a transaction timed out exception? If you are you are most likely creating a transaction dead lock. Dead locks are not the easy to debug, but the key is to look for two execution stacks that work on the same data but in a different order. The first one locks the data the second one needs but can never progress because the second transaction is holding the data for the first.

          • 2. Re: Getter method call of CMP entity hanging
            marsden

            Thanks, with that information I was able to find the problem and it was a deadlock issue.