diff options
author | Arthur Martella <arthur.martella.1@att.com> | 2019-09-27 16:38:37 -0400 |
---|---|---|
committer | Arthur Martella <arthur.martella.1@att.com> | 2019-09-27 16:54:20 -0400 |
commit | 3c1bd98f91094be3b9a3484e4afba0b29f621b40 (patch) | |
tree | 121683c61a981d7708c95964dc1d7a1f58b378c9 /mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java | |
parent | 524904eaedd84201ae008c9098aebcaa69181d14 (diff) |
Deadlock detection and recovery with new Music version
Update MDBC to new Music version
Fix errors caused by update
Deadlock detection and recovery
Replaces improperly stacked commits at https://gerrit.onap.org/r/c/music/mdbc/+/96357/2
Issue-ID: MUSIC-502
Signed-off-by: Martella, Arthur <arthur.martella.1@att.com>
Change-Id: I96b87ba73b811a672e03895e0124d78d9bf409b1
Diffstat (limited to 'mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java')
-rw-r--r-- | mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java b/mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java index 7a09dca..f4f4820 100644 --- a/mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/Utils.java @@ -24,6 +24,8 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Properties; + +import org.onap.music.exceptions.MusicDeadlockException; import org.onap.music.logging.EELFLoggerDelegate; public class Utils { @@ -77,4 +79,12 @@ public class Utils { } } } + + public static MusicDeadlockException getDeadlockException(Throwable t) { + while (t!=null) { + if (t instanceof MusicDeadlockException) return (MusicDeadlockException)t; + t = t.getCause(); + } + return null; + } } |