`
zi_hao
  • 浏览: 2534 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

weglogic jndi

阅读更多
项目之前用的spring,管理hibernate  jdbc多个数据源,在这种情况下没有问题,后来改用weblogic数据源,在一个类里面的方法中报了如下的错误,跟踪发现该方法同时使用了hibernate,jdbc 两个数据源,而且各自配的都有事物,看了网上一些同仁的帖子,jndi,和下面的事物导致了冲突,具体是怎么个冲突法,我不明白,后来在配置中去掉了hibernate的事物,问题解决,但还有待遇测试,测试去掉hibernate事物后 会不会导致没有事物了.....



org.springframework.transaction.IllegalTransactionStateException: Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access.
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:478)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics