tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis MONTEIRO <>
Subject Re: Persistence Unit Property Overrides
Date Sun, 04 Oct 2009 19:57:45 GMT

Hi Quintin,

Yes, you can use InitialContext properties in unit tests to override
Just one tip, you must use the persistence unit name and not the datasource

Have a look to

Hope it helps.

Q Beukes wrote:
> Hey,
> In my persistence unit I have properties to customize the behaviour of
> the JPA implementation, ie. hibernate.
> Is there a way to override these properties programmatically?
> I am thinking specifically of unit tests, where I want hibernate to
> "drop-create" instead of just "create". I tried specifying it in my
> datasource creation properties in the InitialContext environment
> hashtable, but this doesn't seem to take "priority", and looks like it
> is applied last. Or did I make a mistake somewhere?
> Thanks,
> Quintin Beukes

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message