SHARE
TWEET

Untitled

a guest Jun 25th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.javaoo.store;
  2. import javax.persistence.*;
  3.  
  4. public class JPAUtility {
  5.  
  6.     private static final EntityManagerFactory factory =
  7.         Persistence.createEntityManagerFactory( "StorePersistance " );
  8.    
  9.     private JPAUtility() {}
  10.    
  11.     public static EntityManager getEntityManager() {
  12.         return factory.createEntityManager();
  13.     }
  14.    
  15.     public static void closeEntityManagerFactory() {
  16.         factory.close();
  17.     }
  18.  
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top