Policy DB contents removed on DB deadlock

When a DB deadlock occurs, the DB contents can sometimes be deleted
becasue the DB removes the Service Template object and recreates a new
one in two separate DB transactions.

This change makes sure that the object remove and re-create is in a
sngle DB transaction, so the operation will either happen or not happen
so the DB will not be cleared.

Legacy policy handling must also use the SimpleToscaProvider rather than
accessing the DB directly, as SimpleToscaProvider keeps the DB structure
correct.

Issue-ID: POLICY-2548
Change-Id: I263a41cd1d8bec5d7b421045b3b14aad6e6c66d3
Signed-off-by: liamfallon <liam.fallon@est.tech>
8 files changed
tree: dc73cd9d59624b2c0270c0fbaa7968ac4dad879b
  1. models-base/
  2. models-dao/
  3. models-decisions/
  4. models-errors/
  5. models-examples/
  6. models-interactions/
  7. models-pap/
  8. models-pdp/
  9. models-provider/
  10. models-sim/
  11. models-tosca/
  12. releases/
  13. .gitignore
  14. .gitreview
  15. INFO.yaml
  16. LICENSE.txt
  17. lombok.config
  18. pom.xml
  19. README.md
  20. version.properties
README.md

Copyright 2018 AT&T Intellectual Property. All rights reserved. This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE Full license text at https://creativecommons.org/licenses/by/4.0/legalcode

This source repository contains the ONAP Policy Model code that is agnostic to any PDP. It is common amongst all the repositories.

To build it using Maven 3, run: mvn clean install