Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink, DbUnit and In Memory Db

You can pass different login information using persistence unit properties
when creating your EntityManagerFactory
(Persistence.createEntityManagerFactory("<unit-name>", (Map) properties)).

Leon Derks-2 wrote:
> Hello all,
> I want to test my JPA DAO Impl classes.
> The idea is to test this with dbunit, and an in memory database like 
> hsqldb to speed up the tests.
> I want to configure and overwrite the test database settings in java, so 
> I can leave the original persistence.xml file intact with the 
> "production settings".
> Or is it better to have 2 different persistence.xml files. One for my 
> tests and one for "production"?
> Does anyone has a working setup or has some tips for me how to set this
> up?
> Thanks,
> Leon

--- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top