谁能给提供一个struts2+spring2.5+hibernate+proxool配置

如题,在网上查了好多,都不管用.,现在我能配置起来,可是spring的事务不起作用.谁能给提供一个比较完整的DEMO呢.谢谢
[b]问题补充:[/b]
你写的这个我用过了.不行啊.你能不能给我提供一个demo.分还可以加

我的项目这么用是没问题的,如果实在不行的话,用另外一种方法

<bean id="transactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource">
        <ref bean="dataSource" />
    </property>
</bean>
<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> 
     <property name="transactionManager"> 
        <ref local="transactionManager" /> 
     </property> 
     <property name="transactionAttributes"> 
         <props>                  
             <prop key="*">PROPAGATION_REQUIRED,-Exception</prop>  
         </props> 
     </property> 
 </bean> 
 <bean name="beanNameAutoProxy" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator" /> 
 <bean id="transactionProxy" parent="beanNameAutoProxy"> 
      <property name="beanNames"> 
          <list> 
             <value>accountManager</value> 
          </list> 
      </property> 
      <property name="interceptorNames"> 
           <value>transactionInterceptor</value>  
      </property> 
 </bean> 

我给你一个spring 配置事务的代码






/aop:config

<tx:advice id="txAdvice">
    <tx:attributes>
        <tx:method name="get*" read-only="true"/>
        <tx:method name="find*" read-only="true"/>
        <tx:method name="query*" read-only="true"/>
        <tx:method name="load*" read-only="true"/>
        <tx:method name="search*" read-only="true"/>
        <tx:method name="*" />
        <tx:method name="*Faq*" no-rollback-for="com.incesoft.business.commons.ServiceException"/>
        <tx:method name="*faq*" no-rollback-for="com.incesoft.business.commons.ServiceException"/>
        <tx:method name="*Chat*" no-rollback-for="com.incesoft.business.commons.ServiceException"/>
        <tx:method name="*chat*" no-rollback-for="com.incesoft.business.commons.ServiceException"/>
    </tx:attributes>
</tx:advice>

再根据你的情况改一下类.呵呵!
别忘了给我分呀

再加上




accountManager 是你的service,当然事务的控制范围是你在service里有异常出现的话,事务会回滚的,如果在action里有异常的话那肯定不会回滚的.

记得给我加分,请早日节贴 :wink: