diff options
author | xg353y <xg353y@intl.att.com> | 2018-04-10 14:49:40 +0200 |
---|---|---|
committer | xg353y <xg353y@intl.att.com> | 2018-04-10 15:17:25 +0200 |
commit | 2616c5dad88f6f66f9c303b301cbc2462e35c4b8 (patch) | |
tree | 04ad0f972c9242a2fcc92bfd541a75a6d78ae20a | |
parent | b0eb31c5a030c2419a90d4fb82cdef5ecbacc94c (diff) |
Fix transaction issue
Add the transaction annotation, so that template and model will be saved
within the same transaction.
Issue-ID: CLAMP-151
Change-Id: Ia0c50967317c3c158b401175dc1fbc166610518b
Signed-off-by: xg353y <xg353y@intl.att.com>
-rw-r--r-- | src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java index 1b5b4257..91c0b6a6 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java @@ -43,6 +43,7 @@ import org.onap.clamp.clds.model.CldsModel; import org.onap.clamp.clds.model.CldsTemplate; import org.onap.clamp.clds.service.CldsService; import org.onap.clamp.clds.service.CldsTemplateService; +import org.springframework.transaction.annotation.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; @@ -89,6 +90,7 @@ public class CsarInstallerImpl implements CsarInstaller { } @Override + @Transactional public void installTheCsar(CsarHandler csar) throws SdcArtifactInstallerException { try { String serviceTypeId = queryDcaeToGetServiceTypeId(csar); |