Search in sources :

Example 1 with Configurer2Exception

use of indi.mybatis.flying.exceptions.Configurer2Exception in project mybatis.flying by limeng32.

the class TransactiveService2 method addAccount2Transactive.

@Transactional(rollbackFor = { Configurer2Exception.class }, readOnly = false, propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
public void addAccount2Transactive() throws Configurer2Exception {
    Role2_ role2 = new Role2_();
    role2.setName("role2_");
    role2Service.insert(role2);
    throw new Configurer2Exception("asd");
}
Also used : Configurer2Exception(indi.mybatis.flying.exceptions.Configurer2Exception) Role2_(indi.mybatis.flying.pojo.Role2_) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with Configurer2Exception

use of indi.mybatis.flying.exceptions.Configurer2Exception in project mybatis.flying by limeng32.

the class TransactiveService2 method addAccount2Transactive2.

@Transactional(rollbackFor = { Configurer2Exception.class }, readOnly = false, propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
public void addAccount2Transactive2() throws Configurer2Exception {
    Role_ role = new Role_();
    role.setName("role_");
    roleService.insert(role);
    Role2_ role2 = new Role2_();
    role2.setName("role2_");
    role2Service.insert(role2);
    throw new Configurer2Exception("zxc");
}
Also used : Configurer2Exception(indi.mybatis.flying.exceptions.Configurer2Exception) Role_(indi.mybatis.flying.pojo.Role_) Role2_(indi.mybatis.flying.pojo.Role2_) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

Configurer2Exception (indi.mybatis.flying.exceptions.Configurer2Exception)2 Role2_ (indi.mybatis.flying.pojo.Role2_)2 Transactional (org.springframework.transaction.annotation.Transactional)2 Role_ (indi.mybatis.flying.pojo.Role_)1