You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Myroslav Papirkovskyy (JIRA)" <ji...@apache.org> on 2015/11/24 17:36:10 UTC

[jira] [Created] (AMBARI-14046) Refactor code that breaks transaction chaining

Myroslav Papirkovskyy created AMBARI-14046:
----------------------------------------------

             Summary: Refactor code that breaks transaction chaining
                 Key: AMBARI-14046
                 URL: https://issues.apache.org/jira/browse/AMBARI-14046
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.0.0
            Reporter: Myroslav Papirkovskyy
            Assignee: Myroslav Papirkovskyy
            Priority: Critical
             Fix For: 2.1.3


Pattern issue:

{code}
   @Transactional
-  private void unmapHostClusterEntities(String hostName, long clusterId) {
+  void unmapHostClusterEntities(String hostName, long clusterId) {
     HostEntity hostEntity = hostDAO.findByName(hostName);
{code}

Transaction chaining allow graceful rollback as well as affects visibility of changes to entity objects in a DB session.

Presently a lot of chained methods have private access with @Transactional annotation which means the MethodInterceptor which provides the chaining functionality will not work and the intermediate DAO calls will persist.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)