[jboss-user] [Installation, Configuration & Deployment] - JBoss embedded

mhassel do-not-reply at jboss.com
Fri Feb 9 16:15:32 EST 2007


I am trying to use the embedded JBoss for unit testing (EJB3s mainly...)

Everything works great as long as all files belong to the same Eclipse project.

Now I need to use separate unit-test and development projects and I start to run into problems with the persistent context. My development project has a persistence.xml in it that is used during development. I want my unit tests to use it's own persistence.xml with the persistence-units pointing to an in-memory database.

Again: If I just copy all my ejb files from the development project into the test src folder, everything works fine :-(

If I wrap my ejbs into jars, everything works, too!

Having two projects, and just including the other project in build path, both persistence units get deployed during EJB3StandaloneBootstrap.scanClasspath(); leading to an error message (multiple units with the same name)

But even if I remove either one of the persistence.xml files, the ejb's in the development project do not "recognize" the deployed persistence units and i get an error that the unit with a specified name does does not exists (even though I see it gets deployed before....)

Any suggestions how I can get around this problem without using band aid solutions like wrapping my ejb's in jar files???

Thanks for any hint



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013898#4013898

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013898



More information about the jboss-user mailing list