0 Replies Latest reply on Feb 9, 2007 4:15 PM by mhassel

    JBoss embedded

    mhassel


      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