I'm developing a web application using Spring MVC runing on glassfish.

Globaly every is going well but the test purpose.

Since for the webapp i have to decalre in web.xml

Code:
	<persistence-context-ref>
		<persistence-context-ref-name>MyApp_JTA</persistence-context-ref-name>
		<persistence-unit-name>MyApp_JTA</persistence-unit-name>
	</persistence-context-ref>
to make it able to identify persistence unit name in the DAO class

Code:
	@PersistenceContext(unitName = "MyApp_JTA")
	private EntityManager em;
but this make the test using JUnit fails since it uses another persistence unit that doesn't need to be hard coded the as shown above.

So any suggestion ? thanks