persistence@glassfish.java.net

The latest changes to MetadataProcessor?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 19 Oct 2006 14:08:38 -0700

Hi Tom,

The new code seems to have several problems:

         if (m_session == null){
             AbstractSessionLog.getLog().log(SessionLog.CONFIG,
                     SessionLog.EJB_ORM,
                     EntityManagerSetupImpl.ERROR_LOADING_XML_FILE,
                     e);
1. Look below, the same message takes 2 args - which one is correct?

         } else if (!throwException) {

2. Why m_session == null should never throw an exception?

             // fail quietly
             m_session.log(SessionLog.CONFIG,
                     SessionLog.EJB_ORM,
                     EntityManagerSetupImpl.ERROR_LOADING_XML_FILE,
                     new Object[] {mf, e});
         } else {
             // fail loudly
             m_session.handleException(e);
         }

thanks,
-marina