Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.javaoo.store;
- import javax.persistence.*;
- public class JPAUtility {
- private static final EntityManagerFactory factory =
- Persistence.createEntityManagerFactory( "StorePersistance " );
- private JPAUtility() {}
- public static EntityManager getEntityManager() {
- return factory.createEntityManager();
- }
- public static void closeEntityManagerFactory() {
- factory.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement