This content has been marked as final.
Show 6 replies
-
1. Re: EJB3 unit tests, how?
wolfgangknauf Jun 2, 2009 2:47 PM (in response to fatbatman)Hi James,
I think the best way for this is to use an application client. This way, you will also test the full EJB communication layer.
I hope this helps
Wolfgang -
2. Re: EJB3 unit tests, how?
wolfc Jun 3, 2009 2:17 PM (in response to fatbatman)For AS 5.1 you can use the EJB 3.1 Embeddable prototype http://www.jboss.org/community/wiki/EJB31Embeddable
The latest version can also deploy datasources and JPA entities.Properties properties = new Properties(); container = EJBContainer.createEJBContainer(properties); on(container).deploy( deployment(resource("explicit/ds-deployers-beans.xml")), deployment("default-ds", NonXADataSourceDeploymentMetaData.class, localDataSource() .connectionURL("jdbc:hsqldb:mem:defaultdb") .driverClass("org.jboss.ejb3.embedded.test.common.HSQLDBService") .jndiName("java:/DefaultDS") .user("sa") .password("") .getMetaData() )); on(container).deploy( deployment( pkg("org.jboss.ejb3.embedded.test.stateless"), persistence( unit("tempdb") .jtaDataSource("java:/DefaultDS") .property("hibernate.hbm2ddl.auto", "create-drop") )));
-
3. Re: EJB3 unit tests, how?
fatbatman Jun 4, 2009 8:50 AM (in response to fatbatman)Hi Wolf x2 :)
Wolfc, where can I find the rest of the code you posted, you're using some functions...
James -
4. Re: EJB3 unit tests, how?
wolfc Jun 4, 2009 10:40 AM (in response to fatbatman)You can find the latest stuff here: http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/embedded/
You may want to checkout all of trunk and build it. -
5. Re: EJB3 unit tests, how?
samwan808 Jun 10, 2009 7:42 AM (in response to fatbatman)"wolfc" wrote:
You can find the latest stuff here: http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/embedded/
You may want to checkout all of trunk and build it.
How to check it out?
I tried:
svn anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk .
but got errors:
error: unknown command name 'anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk' -
6. Re: EJB3 unit tests, how?
jaikiran Jun 10, 2009 7:53 AM (in response to fatbatman)Here's the details http://www.jboss.org/ejb3/build.html