Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1628

Calling a @Remove method must also close persistence contexts

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None

      Description

      As per the spec, when calling an @Remove method, all persistence contexts attached must also be closed.

      7.6.2 Container-managed Extended Persistence Context
      A container-managed extended persistence context can only be initiated within the scope of a stateful
      session bean. It exists from the point at which the stateful session bean that declares a dependency on an
      entity manager of type PersistenceContextType.EXTENDED is created, and is said to be bound
      to the stateful session bean. The dependency on the extended persistence context is declared by means
      of the PersistenceContext annotation or persistence-context-ref deployment descriptor element.
      The persistence context is closed by the container when the @Remove method of the stateful session
      bean completes (or the stateful session bean instance is otherwise destroyed).

        Attachments

          Activity

            People

            • Assignee:
              jlmonteiro Jean-Louis Monteiro
              Reporter:
              jlmonteiro Jean-Louis Monteiro
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: