How to change Play 2 Framework DB configuration at runtime?
问题 We are using Play 2.1.1 and its built-in JPA integration (JPA.em() etc). How can we dynamically change the db.pass property? Play.application().configuration() seems to be immutable as of Play 2.1. (or we're at least not aware of the mutators) If we are able to change db.pass, how can we reload the DB configuration so that JPA.em() returns an EntityManager using the new password? What we are trying to avoid is having to recreate the EntityManager using EntityManagerFactory. We want to