i have a persistence.xml in META-INF/ folder:
When you create the EntityManagerFactory, you can pass a set of properties that will override what is defined in persistence.xml, e.g.:
Properties props = new Properties();
props.setProperty("javax.persistence.jdbc.url", "test_url");
_emf = Persistence.createEntityManagerFactory("dev", props);
If you want to modify the connection properties after the EntityManagerFactory was created, you must recreate it by calling createEntityManagerFactory()
again.