4 Replies Latest reply on Dec 26, 2002 11:03 AM by Frank Langelage

    CMP2.0 Beans refresh problem (or feature?)

    fmarchioni fmarchioni Newbie

      Hi all,
      I have found this problem while testing some CMP2.0 beans
      (it could be a feature...I don't know!)
      1) I have issued a create(...) on my Entity bean,
      2) I have removed all data from the table with a separate JDBC-Sql
      statement issued from a Jsp.
      3) If I issue again the create(..) from my Entity bean I get an error that
      says, Bean with that key already exists.

      ERROR [STDERR] javax.transaction.TransactionRolledbackException:
      INSERTING AN ALREADY EXISTING BEAN, ID = Fred;

      It's not the typical sql error when
      you duplicate key exception, it's something that has to do with the
      Container's cache,it seems.

      So my question is:
      Is it possible to turn on/off this feature (I think the container should
      call ejbLoad in order to notice that data disappered from the DB).
      Also, is it a peculiar feature of jBoss or it's mandated from EJB specs
      for Containers to work so ??
      Thanks
      Francesco