-
1. Re: Jboss Embed for Junit testing
dhartford Aug 23, 2008 11:28 AM (in response to dhartford)oops - target platform is Jboss 4.0.X, hopeful migration to 4.2.x.
EJB3 beans, with JPA 1.0/hibernate implementation (some hibernate Criteria API calls may be made). -
2. Re: Jboss Embed for Junit testing
dhartford Aug 25, 2008 8:37 AM (in response to dhartford)For those interested, this weekend I still haven't had much success trying to get Jboss Embed up and running.
However, to coincide with this post:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=140340
I did get OpenEJB up and running to test my code in a Junit fashion in about an hour.
http://openejb.apache.org/3.0/injection-of-entitymanager-example.html
I don't use Andromda, but found this reference from an Andromda user on how they did it and their own frustrations with Jboss Embed:
http://galaxy.andromda.org/forum/viewtopic.php?t=5468 -
3. Re: Jboss Embed for Junit testing
alexg79 Oct 3, 2008 10:20 PM (in response to dhartford)I, too, got OpenEJB working for the purposes of unit testing, after two days of tinkering. One thing you should know is that OpenEJB uses OpenJPA as its default persistence provider, so your persistence.xml has to be modified. Also, under OpenEJB, EntityManager#getDelegate() returns a Hibernate EntityManagerImpl instead of a SessionImpl, so you have to call getDelegate twice to get a Hibernate Session. I have not yet been able to make database based authentication or quartz based MDBs working, but they're not necessary for unit testing.