pjfanning commented on code in PR #674:
URL: https://github.com/apache/pekko-connectors/pull/674#discussion_r1630254359
##########
.github/workflows/check-build-test.yml:
##########
@@ -103,6 +103,7 @@ jobs:
- { connector: huawei-push-kit }
- { connector: influxdb, pre_cmd:
'docker-compose up -d influxdb' }
- { connector: ironmq, pre_cmd:
'docker-compose up -d ironauth ironmq' }
+ - { connector: jakartams, pre_cmd:
'docker-compose up -d ibmmq' }
Review Comment:
minor format issue
##########
project/Dependencies.scala:
##########
@@ -347,6 +347,15 @@ object Dependencies {
"org.mdedetrich" %% "pekko-stream-circe" % "1.0.0",
"org.mdedetrich" %% "pekko-http-circe" % "1.0.0"))
+ val JakartaMs = Seq(
+ libraryDependencies ++= Seq(
+ "jakarta.jms" % "jakarta.jms-api" % "3.0.0" % Provided,
Review Comment:
can you pin this in `.scala-steward.conf` ?
##########
jakartams/src/main/scala/org/apache/pekko/stream/connectors/jakartams/ConnectionRetrySettings.scala:
##########
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * license agreements; and to You under the Apache License, version 2.0:
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * This file is part of the Apache Pekko project, which was derived from Akka.
+ */
+
+/*
+ * Copyright (C) since 2016 Lightbend Inc. <https://www.lightbend.com>
+ */
+
+package org.apache.pekko.stream.connectors.jakartams
+
+import com.typesafe.config.Config
+import org.apache.pekko
+import org.apache.pekko.actor.{ ActorSystem, ClassicActorSystemProvider }
Review Comment:
Not a big deal but if you `import org.apache.pekko`, can the other pekko
imports omit the `org.apache` bit?
I won't block a merge over this.
##########
jakartams/src/test/scala/org/apache/pekko/stream/connectors/jakartams/scaladsl/CachedConnectionFactory.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * license agreements; and to You under the Apache License, version 2.0:
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * This file is part of the Apache Pekko project, which was derived from Akka.
+ */
+
+/*
+ * Copyright (C) since 2016 Lightbend Inc. <https://www.lightbend.com>
+ */
+
+package org.apache.pekko.stream.connectors.jakartams.scaladsl
+
+import jakarta.jms.{ Connection, ConnectionFactory }
+
+/**
+ * a silly cached connection factory, not thread safe
+ */
+class CachedConnectionFactory(connFactory: ConnectionFactory) extends
ConnectionFactory {
+
+ var cachedConnection: Connection = null
+
+ override def createConnection(): Connection = {
+ if (cachedConnection == null) {
+ cachedConnection = connFactory.createConnection()
+ }
+ cachedConnection
+ }
+
+ override def createConnection(s: String, s1: String): Connection =
cachedConnection
+
+ // added in JMS 2.0
Review Comment:
could remove this comment
##########
build.sbt:
##########
@@ -274,6 +274,8 @@ lazy val ironmq = pekkoConnectorProject(
lazy val jms = pekkoConnectorProject("jms", "jms", Dependencies.Jms)
+lazy val jakarta = pekkoConnectorProject("jakartams", "jakartams",
Dependencies.JakartaMs)
Review Comment:
could this be `lazy val jakartams` ?
##########
project/Dependencies.scala:
##########
@@ -347,6 +347,15 @@ object Dependencies {
"org.mdedetrich" %% "pekko-stream-circe" % "1.0.0",
"org.mdedetrich" %% "pekko-http-circe" % "1.0.0"))
+ val JakartaMs = Seq(
+ libraryDependencies ++= Seq(
+ "jakarta.jms" % "jakarta.jms-api" % "3.0.0" % Provided,
+ "com.ibm.mq" % "com.ibm.mq.jakarta.client" % "9.3.5.1" % Test,
+ "org.apache.activemq" % "artemis-server" % "2.19.1" % Test,
Review Comment:
could you create an Artemis Version constant?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]