geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Code in Transaction object for JPA?
Date Wed, 10 Jan 2007 01:53:43 GMT
In the org.apache.geronimo.transaction.manager.Transaction class we  
have the following code:

     public Object getEntityManager(String persistenceUnit) {
         return entityManagers.get(persistenceUnit);
     }

     public void setEntityManager(String persistenceUnit, Object  
entityManager) {
         Object oldEntityManager = entityManagers.put 
(persistenceUnit, entityManager);
         if (oldEntityManager != null) {
             throw new EJBException("EntityManager " +  
oldEntityManager + " for persistenceUnit " + persistenceUnit + "  
already associated with this transaction " + xid);
         }
     }


It looks like the only user of these methods is the JPA code.   
Instead of extending out Transaction code for JPA can we simply, just  
put a map in the JPA code?  I'd hate to see our transaction code  
bloated as each spec comes out.

-dain

Mime
View raw message