Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-794

regeneration of EntityBean cache after RemoveException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-3.2.6 Final
    • CMP service
    • None

      SourceForge Submitter: tokobayashi .
      JBoss3.2.2/Win2k,JDK1.4.1

      1) call EJBHome.remove via a SLSB to remove an
      EntityBean.
      2) call EJBHome.findByPrimaryKey via the SLSB by the
      same PK.
      (ObjectNotFoundException is thrown)
      3) call EJBHome.remove via the SLSB by the same PK
      again.
      (RemoveException is thrown)
      4) call EJBHome.findByPrimaryKey via the SLSB by the
      same PK.

      A bean reference is returned(Exception isn't thrown).
      The DB record related to the EntityBean has been
      deleted since 1).
      So, the EntityBean cache seems to be regenerated
      through 3).

      condition:
      commit-option A on the EntityBean
      transaction: Required

      workaround:
      use EJBObject.remove instead of EJBHome.remove.
      use setRollbackOnly in the SLSB.
      throw EJBException when RemoveException is thrown.
      use findByPrimaryKey before remove(not to call
      EJBHome.remove twice).

      an attatched archive is to reproduce the problem.

              olubyans@redhat.com Alexey Loubyansky
              sourceforge-user SourceForge legacy user (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: