0 Replies Latest reply on Jan 16, 2008 10:50 AM by drepster

    renaming persistence.xml for unit testing

    drepster

      Hi,

      I have a J2EE app with a persitence.xml file. I want to unit test some persitence code and i would like to do this outside of the container and therefore need a different peristent unit defined (Resource_local). Since jboss doesn't like having a resource_local persistence context defined in a persistence.xml file i now need to have 2 persistence.xml files: 1 for testing outside of container and 1 for in container running.

      Is there a way to fire up my tests and get them to use the testing persistence.xml (for eg. peristence-test.xml)?

      I can see how this can be done with ant but i am using the eclipse builder to run my junit tests and would like to do this automatically in my code if possible.

      thanks in advance.
      rgds
      andre