解决方案 »

  1.   

    这是我的hibernate 属性
    #hibernate Export JDBC 
    hibernate.connection.pool_size=5
    hibernate.dialect=org.hibernate.dialect.SQLServerDialect
    hibernate.show_sql=true
    hibernate.use_outer_join=true
    hibernate.max_fetch_depth=3
    hibernate.jdbc.batch_size=50
    hibernate.connection.release_mode=auto
    hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext事物是这么配置的</bean> 
     <bean id="transactionManager1"
    class="org.springframework.orm.hibernate4.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory1" />
    </bean> <!--  配置事务传播特性 -->
    <tx:advice id="Advice1" transaction-manager="transactionManager1" >
        <tx:attributes>
          <tx:method name="*" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
        </tx:attributes>
    </tx:advice><!--  配置参与事务的类 -->
    <aop:config  proxy-target-class="true">
    <aop:pointcut id="ServiceMethod1" expression="execution(* com.ec.common.base.BaseBO.*(..))
    ||execution(* com.ygjt.bcb.*.bo.impl.*.*(..))||execution(* com.ec.common.bo.impl.*.*(..))"/><!--  -->
    <aop:advisor pointcut-ref="ServiceMethod1" advice-ref="Advice1" />
    </aop:config>