Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4332

HTTP sessions expiration cause a "javax.naming.ConfigurationException" while trying to "Destroy" the EntityManager components in WebSphere

    Details

      Description

      In WebSphere when the HTTP user session expires, the Seam session listener intercepts the event and try to clean all the pending components
      A call to the method annotated "@Destroy" is called on EntityManager (ie method destroy())
      This methods checks if there is an active Transaction to throw an exception in case there is one. For this it performs a JNDI lookup on java:comp/env/UserTransaction
      In this context, the lookup fails with a javax.naming.ConfigurationException in WebSphere because it is illegal to do such operation in such a thread (The one spawned by WebSphere to timeout the session) and the EntityManager is never closed and the whole clean process fails..
      This can be corrected by intercepting the exception in the ManagedPersistenceContext.close() method and continue with the close operation on the EntityManager

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                titou09 titou10 titou10
                Reporter:
                titou09 titou10 titou10
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: