geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Code in Transaction object for JPA?
Date Wed, 10 Jan 2007 04:00:06 GMT
OK

david jencks

On Jan 9, 2007, at 8:53 PM, Dain Sundstrom wrote:

> 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