Hi everyone:

I want to make the following code in the Transaction:
Code:
public Object insertArticle(Author author, Article article) throws DataAccessException {
        // TODO Auto-generated method stub
        this.getDaofactory().getBaseDao().saveObject(author);
        article.setAuthor(author);
        int i=40/0;  // throw Exception,see if the article was insert into DB
        Object articleID=this.getDaofactory().getBaseDao().saveObject(article);
        return articleID;
    }
So I config the following spring config file:

Code:
<!--  Hibernate Transaction Intercaptor --> 
<bean id="myHibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor"> 
  <property name="sessionFactory"> 
    <ref bean="MySessionFactory"/> 
  </property> 
</bean> 

   <bean id="articleBO" class="com.fangtoo.bussiness.service.ArticleBOImpl"> 
   <property name="daofactory"> 
      <ref bean="DAOFactory"/> 
   </property> 
</bean> 

<bean id="daoBeanNameProxyCreator" 
    class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> 
    <property name="beanNames"><value>user*,articleBO</value></property> 
    <property name="interceptorNames"> 
        <list> 
            <value>&#91;color=red&#93;&#91;b&#93;&#91;size=18&#93;&#91;b&#93;myHibernateInterceptor&#91;/b&#93;&#91;/size&#93;&#91;/b&#93;&#91;/color&#93;</value> 
        </list> 
    </property> 
</bean> 

<bean id="myTransactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> 
  <property name="transactionManager"> 
    <ref bean="myTransactionManager"/> 
  </property> 
  <property name="transactionAttributeSource"> 
    <value> 
      com.fangtoo.bussiness.service.ArticleBOImpl.insert*=PROPAGATION_REQUIRED 
      com.fangtoo.bussiness.service.ArticleBOImpl.insert*=PROPAGATION_MANDATORY 
   </value> 
  </property> 
</bean>
if I change the code:
Code:
<list> 
            <value>&#91;color=red&#93;&#91;b&#93;&#91;size=18&#93;myHibernateInterceptor&#91;/size&#93;&#91;/b&#93;&#91;/color&#93;</value> 
        </list>
to the following code:
Code:
<list> 
            <value>&#91;color=red&#93;&#91;b&#93;&#91;size=18&#93;myTransactionInterceptor&#91;/size&#93;&#91;/b&#93;&#91;/color&#93;</value> 
        </list>
The transaction couldn't be rollback! Why? Why if I use HIbernateInterceptor ,the transaction can rollback, But if I use TransactionInterceptor, the transaction couldn't be rollback?!
Is there any incorrect config in my file?
Thks