Skip to content

Method invocation in same class when both methods are @Transactional, but method 2 never executes #27534

Closed
@hxlqjz

Description

@hxlqjz

I want to use Propagation.REQUIRES_NEW to start a new transaction, but test2 never be executed and process has been hang up. Is there any thing wrong in my example?

here is my code,

    @Override 
    @Transactional(rollbackFor = Exception.class)
    public void test() {
        ((TestServiceImpl) AopContext.currentProxy()).test2();
        log.info("2222222222222222222");

    }

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void test2() {
        log.info("11111111");
    }

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: dataIssues in data modules (jdbc, orm, oxm, tx)status: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions