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
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/EclipseLink%2C-DbUnit-and-In-Memory-Db-tp18484531p18487827.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top