org.springframework.transaction.UnexpectedRollbackException:JTA事务已经回滚(可能是由于超时)

时间:2014-11-27 14:47:08

标签: spring ejb weblogic

环境:Weblogic,Spring,Hibernate和EJB

代码:

public class ServiceImpl    
{        
    @Transactional  
    public void test()  
    {                   
        throw new ArrayIndexOutOfBoundsException();                 
    }   
}   

public class WebLayerClass  
{           
    service.test(); 
}   

当我运行它时,我得到UnexpectedRollbackException而不是ArrayIndexOutOfBoundsException

"org.springframework.transaction.UnexpectedRollbackException: JTA transaction already rolled back (probably due to a timeout)"

0 个答案:

没有答案