This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
In our application we are using a third party framework which creates its own EntityManagerFactory using some xyz-persistence.xml . The framework has its own classes to parse this xml and use EJB3Configuration class to create and EntityManagerFactory.
Now we dont want to use this. So what we have decided is to use simple default way to create EntityManagerFactory (using Persistence.createEntityManagerFactory which will read default persistence.xml in classpath)
Now both my application jar and other framework jar work in parallel.
So my question is can we create two different EntityManagerFactory pointing to same DB in one application? Can there be any issues , problems persistence managers from two EntitymanagerFactories start working parallel on same entity?