Skip to end of metadata
Go to start of metadata

This page contains an attachment of a simple maven project that builds an .ear containing

4 EJBs (3 EEJB and 1 SessionBean)

Sample project shows also how to startup jboss embeddable container for testing purposes.

Tests are run using TestNG. There's a README.TXT file that explains complete setup of the

project (i didnt include jboss libraries otherwise .zip file would have been really huge).

Please feel free to upgrade/change the application if you want, and if you have problems

just mail me back at mmistroni@gmail.com.

Example Test for starting up jboss embeddable container is copied from Christian Bauer's example

on Hibernate CaveatEmptor sample application.

Have fun - Marco  

P.S. Alternatively you cold use Ejb3Unit unit for out of container testing, which has also a maven integration Ejb3Unit 

  • No labels

3 Comments

  1. For users with private repositories, you can place the ejb3-embed jars with something like the following after downloading the embed-ejb3 jars from jboss:

    • mvn deploy:deploy-file -Dfile=./downloaded-libs/hibernate-all.jar -DgroupId=microcontainer.jboss.ejb3 -DartifactId=hibernate-all -Dversion=alpha8 -Dpackaging=jar -DgeneratePOM=true -DrepositoryId=<<your repo server Id>> -Durl=<<repo server url>>
    • mvn deploy:deploy-file -Dfile=./downloaded-libs/jboss-ejb3-all.jar -DgroupId=microcontainer.jboss.ejb3 -DartifactId=jboss-ejb3-all -Dversion=alpha8 -Dpackaging=jar -DgeneratePOM=true -DrepositoryId=<<your repo server Id>> -Durl=<<repo server url>>
    • mvn deploy:deploy-file -Dfile=./downloaded-libs/thirdparty-all.jar -DgroupId=microcontainer.jboss.ejb3 -DartifactId=thirdparty-all -Dversion=alpha8 -Dpackaging=jar -DgeneratePOM=true -DrepositoryId=<<your repo server Id>> -Durl=<<repo server url>>

    Modify your pom.xml as necessary.

  2. For some reason, the sample-maven-project.zip did not work for me. I therefore made a simpler one myself (only containing 1 session bean), which works fine. It is located here: http://www.realdn.net/msblog/content/binary/maven-ejb3-demo.zip&nbsp;

  3. Alternatively you cold use Ejb3Unit unit for out of container testing, which has also a maven integration Ejb3Unit