That is a good example. However, we aren't using maven and testng in JBossESB. But, Ant and JUnit will work just fine.
Here is a link to the JBoss documentation:
I followed this to create the following:
- this is a well testes JUnit TestSetup class that could be ported to JBossESB/common
- this is an application that uses it. ignore the fact that it uses maven2.
- this directory contains all the setup files. they can also be found in the ejb3 embedded container distro
- i also like to use the hsql in-memory db so that tests start fresh each time. hsql is available in the third-part jar in the distro
- we just need to add three jars to the JBossESB lib directory:
- also not that jms can also be tested in the junit. pretty cool!
I'm not sure we can use the EJB3 embedded container. Please talk with Mark Little to clarify this Kurt.
The current situation is that we can test EJB3 with the embedded container, but we can't use it within our product. I always like to test what we release, so it probably doesn't make sense to use the EJB3 support in the container.