This is my runny bean:
@Stateless public class Finder { @PersistenceContext(unitName = "production") EntityManager em; [...] }
It explicitly determines that the name of the storage unit is maintained by production . This block is configured in persistence.xml , and everything is in order. When I test this class, I have to use a different save module, with a different set of properties and configuration parameters. How do I organize it? Create another <persistence-unit> element in persistence.xml ? Is there any best practice for this?
java jpa
yegor256
source share