|
@@ -52,7 +52,8 @@ public class WebSocketServerEndpoint {
|
|
|
|
|
|
@OnOpen
|
|
|
public void onOpen(Session session, @PathParam("path") String path) {
|
|
|
- String sessionId = session.toString().substring(session.getClass().getName().length() + 1);
|
|
|
+ String sessionId = session.toString().substring(session.getClass().getName().length() + 1)
|
|
|
+ .toUpperCase();
|
|
|
ThreadContext.put("TRACE_ID", sessionId);
|
|
|
|
|
|
if (WS_LOG.isDebugEnabled()) {
|
|
@@ -158,7 +159,8 @@ public class WebSocketServerEndpoint {
|
|
|
|
|
|
@OnClose
|
|
|
public void onClose(Session session, @PathParam("path") String path) {
|
|
|
- String sessionId = session.toString().substring(session.getClass().getName().length() + 1);
|
|
|
+ String sessionId = session.toString().substring(session.getClass().getName().length() + 1)
|
|
|
+ .toUpperCase();
|
|
|
ThreadContext.put("TRACE_ID", sessionId);
|
|
|
|
|
|
WS_LOG.debug("[onClose]. path=" + path);
|
|
@@ -167,7 +169,8 @@ public class WebSocketServerEndpoint {
|
|
|
|
|
|
@OnMessage
|
|
|
public void onMessage(Session session, @PathParam("path") String path, String message) {
|
|
|
- String sessionId = session.toString().substring(session.getClass().getName().length() + 1);
|
|
|
+ String sessionId = session.toString().substring(session.getClass().getName().length() + 1)
|
|
|
+ .toUpperCase();
|
|
|
ThreadContext.put("TRACE_ID", sessionId);
|
|
|
|
|
|
WS_LOG.debug("[onMessage]. path=" + path + ". message=" + message);
|
|
@@ -255,7 +258,8 @@ public class WebSocketServerEndpoint {
|
|
|
|
|
|
@OnError
|
|
|
public void onError(Session session, @PathParam("path") String path, Throwable t) {
|
|
|
- String sessionId = session.toString().substring(session.getClass().getName().length() + 1);
|
|
|
+ String sessionId = session.toString().substring(session.getClass().getName().length() + 1)
|
|
|
+ .toUpperCase();
|
|
|
ThreadContext.put("TRACE_ID", sessionId);
|
|
|
|
|
|
WS_LOG.error("[onError]. path=" + path, t);
|