/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package br.usp.nds.remote.persistencia; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; /** * * @author sussumu */ public class Persistencia { private static EntityManagerFactory emf; private static Persistencia instance = new Persistencia(); public EntityManagerFactory getEMF() { if (emf == null) { emf = Persistence.createEntityManagerFactory("remote"); } return emf; } public static Persistencia getInstance() { if (instance == null) { instance = new Persistencia(); } return instance; } }