fix nullpointer, initialize logger
This commit is contained in:
parent
3733c49165
commit
ad42d23545
@ -1,9 +1,9 @@
|
|||||||
package de.hsadmin.core.model;
|
package de.hsadmin.core.model;
|
||||||
|
|
||||||
import java.lang.System.Logger;
|
|
||||||
import java.lang.System.Logger.Level;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import javax.persistence.EntityManagerFactory;
|
import javax.persistence.EntityManagerFactory;
|
||||||
@ -15,7 +15,7 @@ public class PersistenceManager {
|
|||||||
|
|
||||||
private Map<String, EntityManagerFactory> persistenceUnits;
|
private Map<String, EntityManagerFactory> persistenceUnits;
|
||||||
|
|
||||||
private Logger logger;
|
private Logger logger = Logger.getLogger(PersistenceManager.class.getName());
|
||||||
|
|
||||||
public static EntityManager getEntityManager(String persistUnitName) {
|
public static EntityManager getEntityManager(String persistUnitName) {
|
||||||
EntityManagerFactory emf = PersistenceManager.getInstance().getEMF(persistUnitName);
|
EntityManagerFactory emf = PersistenceManager.getInstance().getEMF(persistUnitName);
|
||||||
|
Loading…
Reference in New Issue
Block a user