[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1363) ManagedPersistenceContext.getEntityManager() should not throw NamingException

Michael Youngstrom (JIRA) jira-events at lists.jboss.org
Tue May 29 18:01:08 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1363?page=comments#action_12363464 ] 
            
Michael Youngstrom commented on JBSEAM-1363:
--------------------------------------------

That's good to hear.

Unfortunately since JBSEAM-1144 isn't scheduled until 1.3.1 I'm going to have to figure out some other way to use Seam Managed PersistenceContexts in my environment where I cannot get a UserTransaction through JNDI. :)  I'll figure out something.

> ManagedPersistenceContext.getEntityManager() should not throw NamingException
> -----------------------------------------------------------------------------
>
>                 Key: JBSEAM-1363
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1363
>             Project: JBoss Seam
>          Issue Type: Bug
>    Affects Versions: 1.2.1.GA
>            Reporter: Michael Youngstrom
>             Fix For: 1.3.0.ALPHA
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list