persistence@glassfish.java.net

Re: check in createContainerEMF?

From: Tom Ware <tom.ware_at_oracle.com>
Date: Fri, 20 Oct 2006 10:11:34 -0400

Hi Marina,

  It looks to me as if we can remove that if statement.

-Tom

Marina Vatkina wrote:

>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
>
>