diff --git a/tools/simple-wsclient/pom.xml b/tools/simple-wsclient/pom.xml
index d2e6957..6d33b7a 100644
--- a/tools/simple-wsclient/pom.xml
+++ b/tools/simple-wsclient/pom.xml
@@ -1,6 +1,7 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2018 Ericsson. All rights reserved.
+   Modifications Copyright (C) 2023 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -22,7 +23,7 @@
     <parent>
         <groupId>org.onap.policy.apex-pdp.tools</groupId>
         <artifactId>tools</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>3.0.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>simple-wsclient</artifactId>
@@ -31,14 +32,30 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.java-websocket</groupId>
-            <artifactId>Java-WebSocket</artifactId>
+            <groupId>jakarta.websocket</groupId>
+            <artifactId>jakarta.websocket-api</artifactId>
+            <version>${version.websocket.jakarta}</version>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.websocket</groupId>
+            <artifactId>jakarta.websocket-client-api</artifactId>
+            <version>${version.websocket.jakarta}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.tools</groupId>
             <artifactId>tools-common</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty.websocket</groupId>
+            <artifactId>websocket-jakarta-client</artifactId>
+            <version>${version.jetty}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty.websocket</groupId>
+            <artifactId>websocket-jakarta-server</artifactId>
+            <version>${version.jetty}</version>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java
index 8e607eb..2e6714f 100644
--- a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java
+++ b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ *  Modifications Copyright (C) 2023 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,17 @@
 
 package org.onap.policy.apex.tools.simple.wsclient;
 
+import jakarta.websocket.ClientEndpoint;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.CloseReason.CloseCodes;
+import jakarta.websocket.ContainerProvider;
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.OnClose;
+import jakarta.websocket.OnError;
+import jakarta.websocket.OnMessage;
+import jakarta.websocket.OnOpen;
+import jakarta.websocket.Session;
+import jakarta.websocket.WebSocketContainer;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -29,16 +41,14 @@
 import java.net.URISyntaxException;
 import java.nio.channels.NotYetConnectedException;
 import org.apache.commons.lang3.Validate;
-import org.java_websocket.client.WebSocketClient;
-import org.java_websocket.framing.CloseFrame;
-import org.java_websocket.handshake.ServerHandshake;
 
 /**
  * Simple WS client with a console for events.
  *
  * @author Sven van der Meer (sven.van.der.meer@ericsson.com)
  */
-public class SimpleConsole extends WebSocketClient {
+@ClientEndpoint
+public class SimpleConsole {
 
     /** Application name, used as prompt. */
     private final String appName;
@@ -46,6 +56,8 @@
     // Output and error streams
     private PrintStream outStream;
     private PrintStream errStream;
+    // The Websocket Session
+    private Session userSession;
 
     /**
      * Creates a new simple echo object.
@@ -56,42 +68,54 @@
      * @param outStream the stream for message output
      * @param errStream the stream for error messages
      * @throws URISyntaxException is URI could not be created from server/port settings
+     * @throws IOException on IO exceptions
+     * @throws DeploymentException on deployment exceptions
      * @throws RuntimeException if server or port where blank
      */
     public SimpleConsole(final String server, final String port, final String appName, PrintStream outStream,
-                    PrintStream errStream) throws URISyntaxException {
-        super(new URI("ws://" + server + ":" + port));
+                         PrintStream errStream) throws URISyntaxException, DeploymentException, IOException {
         Validate.notBlank(appName, "SimpleConsole: given application name was blank");
 
+        WebSocketContainer container = ContainerProvider.getWebSocketContainer();
+        container.connectToServer(this, new URI("ws://" + server + ":" + port));
+
         this.appName = appName;
         this.outStream = outStream;
         this.errStream = errStream;
     }
 
-    @Override
-    public void onClose(final int code, final String reason, final boolean remote) {
-        outStream.println(this.appName + ": Connection closed by " + (remote ? "APEX" : "me"));
+    /**
+     * Callback hook for Connection close events.
+     *
+     * @param userSession the userSession which is getting closed.
+     * @param reason the reason for connection close
+     */
+    @OnClose
+    public void onClose(Session userSession, CloseReason reason) {
+        outStream.println(this.appName + ": Connection closed");
+
         outStream.print(" ==-->> ");
-        switch (code) {
-            case CloseFrame.NORMAL:
+        CloseCodes reasonCloseCode = CloseCodes.valueOf(reason.getCloseCode().toString());
+        switch (reasonCloseCode) {
+            case NORMAL_CLOSURE:
                 outStream.println("normal");
                 break;
-            case CloseFrame.GOING_AWAY:
+            case GOING_AWAY:
                 outStream.println("APEX going away");
                 break;
-            case CloseFrame.PROTOCOL_ERROR:
+            case PROTOCOL_ERROR:
                 outStream.println("some protocol error");
                 break;
-            case CloseFrame.REFUSE:
+            case CANNOT_ACCEPT:
                 outStream.println("received unacceptable type of data");
                 break;
-            case CloseFrame.NO_UTF8:
+            case CLOSED_ABNORMALLY:
                 outStream.println("expected UTF-8, found something else");
                 break;
-            case CloseFrame.TOOBIG:
+            case TOO_BIG:
                 outStream.println("message too big");
                 break;
-            case CloseFrame.UNEXPECTED_CONDITION:
+            case UNEXPECTED_CONDITION:
                 outStream.println("unexpected server condition");
                 break;
             default:
@@ -101,19 +125,32 @@
         outStream.print(" ==-->> " + reason);
     }
 
-    @Override
+
+    @OnError
     public void onError(final Exception ex) {
         errStream.println(this.appName + ": " + ex.getMessage());
     }
 
-    @Override
-    public void onMessage(final String message) {
+    /**
+     * Callback hook for Message Events. This method will be invoked when a client send a message.
+     *
+     * @param message The text message
+     */
+    @OnMessage
+    public void onMessage(String message) {
         // this client does not expect messages
     }
 
-    @Override
-    public void onOpen(final ServerHandshake handshakedata) {
-        outStream.println(this.appName + ": opened connection to APEX (" + handshakedata.getHttpStatusMessage() + ")");
+    /**
+     * Callback hook for Connection open events.
+     *
+     * @param userSession the userSession which is opened.
+     */
+    @OnOpen
+    public void onOpen(Session userSession) {
+        outStream.println(this.appName + ": opened connection to APEX (" + userSession.getRequestURI() + ")");
+
+        this.userSession = userSession;
     }
 
     /**
@@ -124,15 +161,6 @@
      * @throws IOException on an IO problem on standard in
      */
     public void runClient() throws IOException {
-        final Thread thread = new Thread() {
-            @Override
-            public void run() {
-                connect();
-            }
-        };
-        thread.setName("ClientThread");
-        thread.start();
-
         final var in = new BufferedReader(new InputStreamReader(System.in));
         var event = new StringBuilder();
         String line;
@@ -143,15 +171,15 @@
 
             final String current = line.trim();
             if ("".equals(current)) {
-                this.send(event.toString());
+                this.userSession.getBasicRemote().sendText(event.toString());
                 event = new StringBuilder();
             } else {
                 event.append(current);
             }
         }
 
-        thread.interrupt();
-        this.close(CloseFrame.NORMAL);
+        this.userSession.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, "Normal Closure"));
     }
 
+
 }
diff --git a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java
index 672594c..8c7aec0 100644
--- a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java
+++ b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2023 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,20 +21,30 @@
 
 package org.onap.policy.apex.tools.simple.wsclient;
 
+import jakarta.websocket.ClientEndpoint;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.CloseReason.CloseCodes;
+import jakarta.websocket.ContainerProvider;
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.OnClose;
+import jakarta.websocket.OnError;
+import jakarta.websocket.OnMessage;
+import jakarta.websocket.OnOpen;
+import jakarta.websocket.Session;
+import jakarta.websocket.WebSocketContainer;
+import java.io.IOException;
 import java.io.PrintStream;
 import java.net.URI;
 import java.net.URISyntaxException;
 import org.apache.commons.lang3.Validate;
-import org.java_websocket.client.WebSocketClient;
-import org.java_websocket.framing.CloseFrame;
-import org.java_websocket.handshake.ServerHandshake;
 
 /**
  * Simple WS client as an echo.
  *
  * @author Sven van der Meer (sven.van.der.meer@ericsson.com)
  */
-public class SimpleEcho extends WebSocketClient {
+@ClientEndpoint
+public class SimpleEcho {
 
     /** Application name, used as prompt. */
     private final String appName;
@@ -51,42 +62,54 @@
      * @param outStream the stream for message output
      * @param errStream the stream for error messages
      * @throws URISyntaxException is URI could not be created from server/port settings
+     * @throws IOException on IO exceptions
+     * @throws DeploymentException on deployment exceptions
      * @throws RuntimeException if server or port where blank
      */
     public SimpleEcho(final String server, final String port, final String appName, PrintStream outStream,
-                    PrintStream errStream) throws URISyntaxException {
-        super(new URI("ws://" + server + ":" + port));
+                      PrintStream errStream) throws URISyntaxException, DeploymentException, IOException {
+
         Validate.notBlank(appName, "SimpleEcho: given application name was blank");
- 
+        WebSocketContainer container = ContainerProvider.getWebSocketContainer();
+        container.connectToServer(this, new URI("ws://" + server + ":" + port));
+
         this.appName = appName;
         this.outStream = outStream;
         this.errStream = errStream;
     }
 
-    @Override
-    public void onClose(final int code, final String reason, final boolean remote) {
-        outStream.println(this.appName + ": Connection closed by " + (remote ? "APEX" : "me"));
+    /**
+     * Callback hook for Connection close events.
+     *
+     * @param userSession the userSession which is getting closed.
+     * @param reason the reason for connection close
+     */
+    @OnClose
+    public void onClose(Session userSession, CloseReason reason) {
+        outStream.println(this.appName + ": Connection closed");
         outStream.print(" ==-->> ");
-        switch (code) {
-            case CloseFrame.NORMAL:
+
+        CloseCodes reasonCloseCode = CloseCodes.valueOf(reason.getCloseCode().toString());
+        switch (reasonCloseCode) {
+            case NORMAL_CLOSURE:
                 outStream.println("normal");
                 break;
-            case CloseFrame.GOING_AWAY:
+            case GOING_AWAY:
                 outStream.println("APEX going away");
                 break;
-            case CloseFrame.PROTOCOL_ERROR:
+            case PROTOCOL_ERROR:
                 outStream.println("some protocol error");
                 break;
-            case CloseFrame.REFUSE:
+            case CANNOT_ACCEPT:
                 outStream.println("received unacceptable type of data");
                 break;
-            case CloseFrame.NO_UTF8:
+            case CLOSED_ABNORMALLY:
                 outStream.println("expected UTF-8, found something else");
                 break;
-            case CloseFrame.TOOBIG:
+            case TOO_BIG:
                 outStream.println("message too big");
                 break;
-            case CloseFrame.UNEXPECTED_CONDITION:
+            case UNEXPECTED_CONDITION:
                 outStream.println("unexpected server condition");
                 break;
             default:
@@ -96,13 +119,18 @@
         outStream.print(" ==-->> " + reason);
     }
 
-    @Override
+    @OnError
     public void onError(final Exception ex) {
         errStream.println(this.appName + ": " + ex.getMessage());
     }
 
-    @Override
-    public void onMessage(final String message) {
+    /**
+     * Callback hook for Message Events. This method will be invoked when a client send a message.
+     *
+     * @param message The text message
+     */
+    @OnMessage
+    public void onMessage(String message) {
         outStream.println(this.appName + ": received");
         outStream.println("---------------------------------");
         outStream.println(message);
@@ -110,9 +138,13 @@
         outStream.println();
     }
 
-    @Override
-    public void onOpen(final ServerHandshake handshakedata) {
-        outStream.println(this.appName + ": opened connection to APEX (" + handshakedata.getHttpStatusMessage() + ")");
+    /**
+     * Callback hook for Connection open events.
+     *
+     * @param userSession the userSession which is opened.
+     */
+    @OnOpen
+    public void onOpen(Session userSession) {
+        outStream.println(this.appName + ": opened connection to APEX (" + userSession.getRequestURI() + ")");
     }
-
 }
diff --git a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java
index e3af4dc..405013b 100644
--- a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java
+++ b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ *  Modifications Copyright (C) 2023 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,7 @@
 
 package org.onap.policy.apex.tools.simple.wsclient;
 
+import jakarta.websocket.DeploymentException;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.PrintWriter;
@@ -141,8 +143,7 @@
         outStream.println();
 
         try {
-            final var simpleEcho = new SimpleEcho(server, port, APP_NAME, outStream, outStream);
-            simpleEcho.connect();
+            new SimpleEcho(server, port, APP_NAME, outStream, outStream);
         } catch (final URISyntaxException uex) {
             String message = APP_NAME + ": URI exception, could not create URI from server and port settings";
             outStream.println(message);
@@ -155,6 +156,18 @@
             String message = APP_NAME + ": illegal argument, server or port were blank";
             outStream.println(message);
             LOGGER.warn(message, iex);
+        } catch (DeploymentException dex) {
+            String message = APP_NAME + ": could not deploy client";
+            outStream.println(message);
+            LOGGER.warn(message, dex);
+        } catch (IOException iox) {
+            String message = APP_NAME + ": illegal argument, IO execption on client";
+            outStream.println(message);
+            LOGGER.warn(message, iox);
+        } catch (Exception xex) {
+            String message = APP_NAME + ": Unknown execption on client";
+            outStream.println(message);
+            LOGGER.warn(message, xex);
         }
     }
 
@@ -199,10 +212,18 @@
             String message = APP_NAME + ": not yet connected, connection to server took too long";
             outStream.println(message);
             LOGGER.warn(message, nex);
+        } catch (DeploymentException dex) {
+            String message = APP_NAME + ": could not deploy client";
+            outStream.println(message);
+            LOGGER.warn(message, dex);
         } catch (final IOException ioe) {
             String message = APP_NAME + ": IO exception, something went wrong on the standard input";
             outStream.println(message);
             LOGGER.warn(message, ioe);
+        } catch (Exception xex) {
+            String message = APP_NAME + ": Unknown execption on client";
+            outStream.println(message);
+            LOGGER.warn(message, xex);
         }
     }
 
