Hi

maybe simply rename the test one to test.persistence.xml and use altdd
feature http://tomee.apache.org/alternate-descriptors.html

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/26 jaigates <[email protected]>

> Hi,
> I have 2 persistence.xml in my maven project,
>  1. src/main/resources
>  2. src/test/resources
>
> When i run the testcase,it s picking file from main/resources instead of
> test/resources and throwing the following error,
> the reference @PersistenceContext(name="entityManager",
> unitName="entityManagername") cannot be resolved as there are 6 units with
> the same name.
>
> Kindly let me know how to ignore persistence.xml main/resouces while
> running
> test case,
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Multiple-persistence-xml-tp4662474.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Reply via email to