[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-456) Interceptor tries to access UserTransaction interface, but this is not allowed for CMT

Guy Veraghtert (JIRA) jira-events at jboss.com
Thu Nov 2 08:39:41 EST 2006


Interceptor tries to access UserTransaction interface, but this is not allowed for CMT
--------------------------------------------------------------------------------------

                 Key: JBSEAM-456
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-456
             Project: JBoss Seam
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.0.BETA1
         Environment: Glassfish
            Reporter: Guy Veraghtert


In method getEntityManager() in class ManagedPersistenceContext a call is made to the UserTransaction interface: isActive(). According to the EJB 3.0 specification (p.81) this is not allowed for CMT. Seam requires the usage of CMT.
(Occurs when adding @In to an entityManager-field, according to seam doc 11.4).

Patched locally in class ManagedPersistenceContext :

   @Unwrap
   public EntityManager getEntityManager() throws NamingException, SystemException
   {
      if ( !Lifecycle.isDestroying() /*&& Transactions.isTransactionActive()*/ )
      {
         try
         {
            entityManager.joinTransaction();
         } catch (TransactionRequiredException e) {
            
         }
      }
      return entityManager;
   }

-- 
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