From 178f2eba28c6713ade8656a83c625cfe738d22ba Mon Sep 17 00:00:00 2001 From: hongwei Date: Wed, 13 Nov 2024 10:58:27 +0100 Subject: [PATCH] docfix/added comments --- .../rabbitmq/Adapter/AdapterStubBuilder.scala | 2 +- .../rabbitmq/Adapter/MockedRabbitMqAdapter.scala | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/AdapterStubBuilder.scala b/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/AdapterStubBuilder.scala index 2af366213f..5b563549dc 100644 --- a/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/AdapterStubBuilder.scala +++ b/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/AdapterStubBuilder.scala @@ -59,7 +59,7 @@ object AdapterStubBuilder { println("===================") val path = new File(getClass.getResource("").toURI.toString.replaceFirst("target/.*", "").replace("file:", ""), - "src/main/scala/code/bankconnectors/rabbitmq/Adapter/RPCServer.scala") + "src/main/scala/code/bankconnectors/rabbitmq/Adapter/MockedRabbitMqAdapter.scala") val source = FileUtils.readFileToString(path, "utf-8") val start = "//---------------- dynamic start -------------------please don't modify this line" val end = "//---------------- dynamic end ---------------------please don't modify this line" diff --git a/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/MockedRabbitMqAdapter.scala b/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/MockedRabbitMqAdapter.scala index 07b4ca1e9e..f9031c8c80 100644 --- a/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/MockedRabbitMqAdapter.scala +++ b/obp-api/src/main/scala/code/bankconnectors/rabbitmq/Adapter/MockedRabbitMqAdapter.scala @@ -3067,6 +3067,10 @@ class ServerCallback(val ch: Channel) extends DeliverCallback with MdcLoggable{ } +/** + * This is only for testing, not ready for production. + * Still in processing. + */ object MockedRabbitMqAdapter extends App with MdcLoggable{ private val RPC_QUEUE_NAME = "obp_rpc_queue" @@ -3105,7 +3109,7 @@ object MockedRabbitMqAdapter extends App with MdcLoggable{ } finally { if (connection != null) { try { - // connection.close() + // connection.close() //this is a tempreory solution, we keep this connection open to wait for messages } catch { case e: Exception => logger.error(s"unknown Exception:$e") }