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?