tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <>
Subject Re: Nuking tables on tearDown() for CRUD tests
Date Sun, 06 Jan 2008 23:44:34 GMT
On Jan 6, 2008 11:42 PM, Alexander Saint Croix
<> wrote:

> Dain mentioned that I might completely drop and restart OpenEJB between
> tests.  He also mentioned that OpenJPA might have a way to wipe the database
> tables clean for a given persistence unit.

Here's one possible solution for you - the usage of in-memory db and
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(SchemaAction='add,deleteTableContents')" />. Until
an em is in use the tables are there in db. Once it's closed, at
openejb shutdown, the tables will get dropped automatically. You may
also want to remove the target directory where the db sits in.

for some configuration settings. The article is about how entity
changes are persisted in db using different jpa providers and is
written in Polish, but the configuration files should be
well-understandable by non-Polish speakers too.


Jacek Laskowski

View raw message