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

Calling a @Remove method must also close persistence contexts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: