영속성 컨텍스트

    [ORM > JPA] 영속성 컨텍스트

    [ORM > JPA] 영속성 컨텍스트

    EntityManagerEntityManager는 Entity(객체와 테이블이 매칭되는 개념)를 관리하는 역할을 합니다.EntityManagerFactory가 요청이 올때마다 생성하는 비용이 매우 크기 때문에, 대신 생성비용이 거의 없는 EntityManager가 생성됩니다.public interface EntityManagerFactory { /** * Create a new application-managed EntityManager. * This method returns a new EntityManager instance each time * it is invoked. * The isOpen method will return true on the returned..