persistence@glassfish.java.net

Re: Changes to persistence.xml ddl-generation takes effect only after second deployment

From: Mitesh Meswani <mitesh.meswani_at_oracle.com>
Date: Wed, 18 May 2011 00:08:56 -0700

The behavior is as expected. When you specify drop-and-create-tables,
the tables are dropped at undeploy of the app instance that was deployed
with the option.
On 5/17/2011 11:07 PM, Jouni Latvatalo wrote:
> Hi,
>
> I have a rather peculiar problem that I'm failing to solve.. Or even
> debug any further.
>
> I have a maven build that creates an ear which is deployed to
> Glassfish ESB v2.2. My problem is, that if I make changes to
> persistence.xml eclipselink.ddl-generation (let's say I change the
> value from create-tables to drop-and-create-tables) I need to deploy
> the ear twice in order for the changes to take effect (for the tables
> to be actually dropped).
>
> Running:
> maven 3.0.2
> java 1.6.0_24
> Glassfish ESB v2.2
> Eclipselink 2.1.2
>
> All though I'm not sure if the information above is relevant or not
> because if I recall right, we had similar problems with the same
> project back in the day when it was still an ant build and the
> persistence framework used was toplink.
>
> I'm not exactly sure what kind of information I should attach to this
> question since I have absolutely no clue what might be causing this..
>
> Any ideas will be much appreciated.
>
> Br,
> Jouni Latvatalo