persistence@glassfish.java.net

check in createContainerEMF?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 19 Oct 2006 18:59:33 -0700

Tom, Andrei, Gordon,

Can any of you shed light on the following lines in createContainerEMF() code:

         if(!emSetupImpl.isDeployed()) {
             transformer = emSetupImpl.predeploy(info, nonNullProperties);
         }

Now, the only lines before that, that do anything about emSetupImpl, will create
a new instance and set the in-container mode:

         EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl();
         emSetupImpl.setIsInContainerMode(true);

What is the purpose of the check above?

thanks,
-marina