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

ManagedPersistenceContext.getEntityManager() should not throw NamingException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 1.2.1.GA
    • Fix Version/s: 1.3.0.ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      ManagedPersistenceContext.getEntityManager() has the potential to throw a NamingException because of a call to Transactions.isTransactionActive(). I believe ManagedPersistenceContext.getEntityManager() should assume that a NamingException thrown from Transactions.isTransactionActive() equates to "false".

      My guess is the "throws NamingException" might be a relic of obtaining an EntityMangager from an EMF obtained through JNDI. However, that has moved to initEntityManager() that handles the error of obtaining an EMF on it's own. So, I think getEntityManager should log a NamingException thrown from Transactions.isTransactionActive() and move on as if no transaction is active.

      Mike

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                youngm youngm
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: