tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilane <Ilane.Walb...@Sun.COM>
Subject EJB testing with Hibernate + Maven + JUnit
Date Tue, 28 Jul 2009 19:02:41 GMT

I am setting up some tests for existing session EJBs, basically for
regression testing purposes, but also to run automatically during builds. 
These EJBs are essentially a CRUD interface for the persisent entities using
Hibernate.  I'm not really an EJB3 expert and am struggling somewhat in
finding an OpenEJB tutorial which addresses my situation.  I have the
following issues I'm trying to resolve:

Note: The current system uses both Hibernate mapping files, persistence.xml
to define the data source, and EJB annotations.  The test database is
HSQLDB, the production db is mysql.

 * What is the proper way to set up (i.e. tell the framework to use) the
.hbm.xml mapping files?  (I had <mapping-file> set up in persistence.xml but
was getting "duplicate mapping" errors until I commented it out.)
 * How can I verify that the tests are actually using the database type I
want (HSQLDB)?  (I'm a little paranoid!)
 * What is the most appropriate way to clear the database in the setUp()

Thanks for any hints, pointers, references, and support you can provide.


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

View raw message