0 Replies Latest reply on Aug 14, 2002 2:07 PM by roysun

    ejbHome does not work find in try catch block

    roysun Newbie

      I have following code does creating. If catch SQLException for insert a duplicate key which defined by database, does another creation avoid the same key value.
      try{
      myHome.create(a);
      }
      catch(SQLException e)
      {
      myHome.create(b);
      }

      The second creation does not work fine. Check log file it says:
      javax.ejb.CreateException: Error checking entity exists: No results were returned by the query.

      It dose not work too even I lookup a new home in catch block.

      Anybody has idea what is the problem?

      Roy