I try to include the JBoss embeddable EJB3 in my JUnit test enviromnent. EJB3StandaloneBootstrap.scanClasspath uses the classpath in java.class.path. For my test I use several classloader (classpath is not defined in java.class.path. Consequenlty I need to deploy my tests using the EJB3StandaloneDeployer.
Tests classes and persistence.xml are in several directories. I wrotte the following code:
EJB3StandaloneDeployer deployer = EJB3StandaloneBootstrap.createDeployer(); deployer.getDeployDirs().add(url1); deployer.getDeployDirs().add(url2); ... deployer.create(); deployer.start();