Java Desktop Applications – switch propertie from a JPA persistent unit at runtime

Java Desktop Applications – switch propertie from a JPA persistent unit at runtime

HashMap propertiesMap; javax.persistence.EntityManager entityManager; propertiesMap = new HashMap(); propertiesMap.put(“toplink.jdbc.password", “password"); propertiesMap.put(“toplink.jdbc.url", “url"); entityManager = javax.persistence.Persistence.createEntityManagerFactory(“persistencePU", propertiesMap).createEntityManager();

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

What is 2 + 10 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)