John Speidel created AMBARI-4357:
------------------------------------
Summary: ServiceResourceProvider appears to use transactions
incorrectly
Key: AMBARI-4357
URL: https://issues.apache.org/jira/browse/AMBARI-4357
Project: Ambari
Issue Type: Bug
Components: controller
Reporter: John Speidel
I am looking at the ServiceResourceProvider class which is responsible for
setting/getting information related to the service resource from the Ambari DB
and see that JPA is being used.
Looking at how transactions are demarcated in this class, I have serious
concerns.
- The getter method 'getResources' has a '@Transactional' annotation even
though it doesn't perform any database writes.
- The create and update methods 'createResources' and 'updateResources', which
do update the database, have no transactional annotations.
I can think of no explanation where this transactional behavior would be
correct. This behavior needs to be understood, reviewed and corrected. If
this is the desired behavior, it needs to be clarified.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)