This rule checks that the @Transactional annotation is properly used from JEE. The use of the org.springframework.transaction.annotation.Transactional annotation is discouraged, use the JEE standard javax.transaction.Transactional. Do not use this annotation in the api scope but to annotate implementations.

Noncompliant Code Examples

    package com.devonfw.ide.sonarqube.logic.impl;

    import org.springframework.transaction.annotation.Transactional;

    public class MyClass {}

    package com.devonfw.ide.sonarqube.common.api;

    import javax.transaction.Transactional;

    public class MyClass {}

Compliant Solution

    package com.devonfw.ide.sonarqube.logic.impl;

    import javax.transaction.Transactional;

    public class MyClass {}