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

Reply via email to