What is the difference between LocalContainerEntityManagerFactoryBean and LocalEntityManagerFactoryBean?

后端 未结 7 527
离开以前
离开以前 2020-12-24 01:45

Can anybody explain what is the difference between the Spring Framework\'s LocalContainerEntityManagerFactoryBean and LocalEntityManagerFactoryBean?

相关标签:
7条回答
  • 2020-12-24 02:11

    LocalEntityManagerFactoryBean

    is the simplest and the most limited. You cannot refer to an existing JDBC DataSource bean definition and no support for global transactions exists.

    LocalContainerEntityManagerFactoryBean

    is the most powerful JPA setup option, allowing for flexible local configuration within the application. It supports links to an existing JDBC DataSource, supports both local and global transactions

    REF: spring-framework-reference.pdf "Spring 3"

    0 讨论(0)
提交回复
热议问题