2 Replies Latest reply on Jan 28, 2006 11:14 AM by martplus

    Persistence unit outside a jar

    martplus

      Hello everyone,

      I am using embedded ejb to test my ejb3 application within JUnit tests. I'm pretty surprised about the good quality of the alpha-version (thanks for that good work!)

      The fact that a persistence unit must be within a jar makes development a little harder, because I have to package the stuff each time I want to test a code-modification.

      If a persistence-archive could be located in a source-folder with exact the same structure (like it is specified to be inside a par-file) I would not have to press Ctrl-Shift-F2 after navigating to the project containing the package-build.xml each time I want to test - it would make work more relaxed!



      Best, Martin


        • 1. Re: Persistence unit outside a jar
          bill.burke

          it should work if you have the same structure as the jar in a exploded fashion and have this directory in your classpath.

          • 2. works with a little trick!
            martplus

            OK, I it works - with a little trick:

            When I start my testcases directly, the embeddable ejb bootstrap classes don't find my configuration files (which are in the root of my src folder).

            But when I launch my testcases in a different project (which has a build-path to the project containing the testcases) it works fine.