微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

spring – 如何配置玻璃鱼以使用应用程序管理的实体管理器?

如何配置玻璃鱼以使用应用程序管理的实体管理器?我通过下面给出的配置得到以下错误.

我不希望glassfish管理事务,我只想在持久性单元中使用带有RESOURCE_LOCAL设置的Spring托管事务,而不是JTA

SEVERE: Exception while preparing the app : The persistence-context-ref-name [org.springframework.data.jpa.repository.support.JpaRepositoryfactorybean/entityManager] .... resolves to a persistence unit called [spring-jpa] which is of type RESOURCE_LOCAL. Only persistence units with transaction type JTA can be used as a container managed entity manager. Please verify your application.

我的配置:

persistence-unit name="spring-jpa" transaction-type="RESOURCE_LOCAL">
    MysqL/mydbpersistence-unit>

我的应用背景:

spring-beans-3.1.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
        http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">

    factorybean">
        vendorAdapter">
          
                
                                 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐