3 Replies Latest reply on Oct 11, 2010 9:39 PM by Nikolay Elenkov

    Alternative persistence.xml for TestNG suite

    Bart Matthaei Newbie


      I've used JBoss Tools to generate an EAR style seam project for me. Works fine, but now I want to use the test project to do some integration tests on my components.

      The trick here is that the development environment uses a MySQL datasource, but I want the embedded jboss that runs my tests to use DefaultDS or some other HSQL datasource.

      I am able to offer an alternative datasource in the project-ds-test.xml, but since my persistence unit has the MySQL dialect set, I get errors when it tries to generate my tables in HSQL. This is fixed if I change the dialect in the persistence unit, but I don't want to change the dialect every time I run some tests.

      Is there any way to offer an alternative persistence.xml when the project is deployed with TestNG / embedded jboss?