您要什么代码给您。。
给您看看spring的事物,看看是不是有问题<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml">
</property>
</bean> <!-- 事务管理 -->
<!-- 定义一个事务管理器 -->
<bean id="myHibTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory">
</property>
</bean>
<!--定义事务通知-->
<tx:advice id="txAdvice" transaction-manager="myHibTransactionManager">
<!--声明事务规则-->
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="del*" propagation="REQUIRED" />
<!--对其他方法要求只读事务-->
<tx:method name="*" propagation="SUPPORTS" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<!--定义一个切面,即定义哪些方法应用这些规则-->
<aop:pointcut id="bizMethods" expression="execution(* com.cntomorrow.zyqx.biz.*.*(..))" />
<!--将事务通知和切面组合(织入)-->
<aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" />
</aop:config>