How to read renamed persistence.xml file in application?for example persistence-test.xml,file location specified in src/main/resources/META-INF folder , while creating entitymanager factory using persistence-test.xml exception is thrown stating that unable to create entitymanager with persistence unit name
Are you using Spring?
Yes sir I am using spring data jpa but as i have informed you entitymanager which injected using @ Persistencecontext is not releasing open cursors.so I want to create separate entity manager in application for batch operations,which is created using persistence.xml apart from spring injection.will it be possible to create entitymanager ?If i rename persistence.xml to persistence- test and place in src/main/resources/META-INF I want to create entitymanager using persistence-test.xml
If you can replicate it with this test case template:
http://in.relation.to/2016/01/14/hibernate-jpa-test-case-template/
Then it could be a Hibernate issue.
If you can only replicate it with Spring, it’s a Spring issue and you have to investigate it with the Spring team.
Using just Hibernate ORM the configuration file must be named persistence.xml .
If Spring makes it possible to name it differently that’s a Spring feature so like Vlad suggests you should report such issues to Spring.
Thank you sir.can you please post link of spring team ?so that I can check with them .