From db49ee3a7a1b802469ab078387a3fde14b71c8b8 Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Mon, 24 Jul 2023 15:01:06 +0530 Subject: [PATCH 1/4] Remove unwanted APIs --- ballerina/connection.bal | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ballerina/connection.bal b/ballerina/connection.bal index 7be68105..9e831a63 100644 --- a/ballerina/connection.bal +++ b/ballerina/connection.bal @@ -83,10 +83,6 @@ public type ConnectionConfiguration record {| map properties = {}; |}; -public isolated function createConnection(ConnectionConfiguration c) returns Connection|error{ - return new Connection(c); -} - isolated function createJmsConnection(string initialContextFactory, string providerUrl, string connectionFactoryName, map otherPropeties) returns handle|error = @java:Method { 'class: "io.ballerina.stdlib.java.jms.JmsConnectionUtils" From c30c734c0af98b02e3219b6e5121e106b308550b Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Mon, 24 Jul 2023 15:04:08 +0530 Subject: [PATCH 2/4] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/Dependencies.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 30031356..f2e47cf8 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerinax" name = "java.jms" -version = "0.0.1" +version = "0.1.0" authors = ["Ballerina"] keywords = ["jms"] repository = "https://github.com/ballerina-platform/module-ballerina-java.jms" @@ -12,8 +12,8 @@ distribution = "2201.6.0" [[platform.java11.dependency]] groupId = "io.ballerina.stdlib" artifactId = "java.jms-native" -version = "0.0.1" -path = "../native/build/libs/java.jms-native-0.0.1-SNAPSHOT.jar" +version = "0.1.0" +path = "../native/build/libs/java.jms-native-0.1.0-SNAPSHOT.jar" [[platform.java11.dependency]] groupId = "org.slf4j" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 23381a4e..47a1d93a 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -57,7 +57,7 @@ dependencies = [ [[package]] org = "ballerinax" name = "java.jms" -version = "0.0.1" +version = "0.1.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "log"} From 0f51f483474d7bb3139e5933915300d068a5d78a Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Mon, 24 Jul 2023 15:06:06 +0530 Subject: [PATCH 3/4] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/Dependencies.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index dabd28a8..358c297d 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerinax" name = "java.jms" -version = "0.1.0" +version = "0.1.1" authors = ["Ballerina"] keywords = ["jms"] repository = "https://github.com/ballerina-platform/module-ballerina-java.jms" @@ -12,8 +12,8 @@ distribution = "2201.6.0" [[platform.java11.dependency]] groupId = "io.ballerina.stdlib" artifactId = "java.jms-native" -version = "0.1.0" -path = "../native/build/libs/java.jms-native-0.1.0.jar" +version = "0.1.1" +path = "../native/build/libs/java.jms-native-0.1.1-SNAPSHOT.jar" [[platform.java11.dependency]] groupId = "org.slf4j" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 47a1d93a..0d69a655 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -57,7 +57,7 @@ dependencies = [ [[package]] org = "ballerinax" name = "java.jms" -version = "0.1.0" +version = "0.1.1" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "log"} From ba6ab0e00e7b8817ebbb3a8a1fafb3f45d75e4cd Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Mon, 24 Jul 2023 15:12:46 +0530 Subject: [PATCH 4/4] Update documentation --- README.md | 16 ++++++++-------- ballerina/Module.md | 16 ++++++++-------- ballerina/Package.md | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index cd7bca86..a9d7ee49 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,10 @@ The following Ballerina program sends messages to a queue named *MyQueue*. import ballerinax/java.jms; public function main() returns error? { - jms:Connection connection = check jms:createConnection({ - initialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", - providerUrl: "tcp://localhost:61616" - }); + jms:Connection connection = check new ( + initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory", + providerUrl = "tcp://localhost:61616" + ); jms:Session session = check connection->createSession({acknowledgementMode: "AUTO_ACKNOWLEDGE"}); jms:Destination queue = check session->createQueue("MyQueue"); jms:MessageProducer producer = check session.createProducer(queue); @@ -54,10 +54,10 @@ import ballerinax/java.jms; import ballerina/log; public function main() returns error? { - jms:Connection connection = check jms:createConnection({ - initialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", - providerUrl: "tcp://localhost:61616" - }); + jms:Connection connection = check new ( + initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory", + providerUrl = "tcp://localhost:61616" + ); jms:Session session = check connection->createSession({acknowledgementMode: "AUTO_ACKNOWLEDGE"}); jms:Destination queue = check session->createQueue("MyQueue"); jms:MessageConsumer consumer = check session.createConsumer(queue); diff --git a/ballerina/Module.md b/ballerina/Module.md index 9742d0aa..7929dbee 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -28,10 +28,10 @@ The following Ballerina program sends messages to a queue named *MyQueue*. import ballerinax/java.jms; public function main() returns error? { - jms:Connection connection = check jms:createConnection({ - initialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", - providerUrl: "tcp://localhost:61616" - }); + jms:Connection connection = check new ( + initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory", + providerUrl = "tcp://localhost:61616" + ); jms:Session session = check connection->createSession({acknowledgementMode: "AUTO_ACKNOWLEDGE"}); jms:Destination queue = check session->createQueue("MyQueue"); jms:MessageProducer producer = check session.createProducer(queue); @@ -49,10 +49,10 @@ import ballerinax/java.jms; import ballerina/log; public function main() returns error? { - jms:Connection connection = check jms:createConnection({ - initialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", - providerUrl: "tcp://localhost:61616" - }); + jms:Connection connection = check new ( + initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory", + providerUrl = "tcp://localhost:61616" + ); jms:Session session = check connection->createSession({acknowledgementMode: "AUTO_ACKNOWLEDGE"}); jms:Destination queue = check session->createQueue("MyQueue"); jms:MessageConsumer consumer = check session.createConsumer(queue); diff --git a/ballerina/Package.md b/ballerina/Package.md index 85c6a0ac..a622b372 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -27,10 +27,10 @@ The following Ballerina program sends messages to a queue named *MyQueue*. import ballerinax/java.jms; public function main() returns error? { - jms:Connection connection = check jms:createConnection({ - initialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", - providerUrl: "tcp://localhost:61616" - }); + jms:Connection connection = check new ( + initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory", + providerUrl = "tcp://localhost:61616" + ); jms:Session session = check connection->createSession({acknowledgementMode: "AUTO_ACKNOWLEDGE"}); jms:Destination queue = check session->createQueue("MyQueue"); jms:MessageProducer producer = check session.createProducer(queue); @@ -48,10 +48,10 @@ import ballerinax/java.jms; import ballerina/log; public function main() returns error? { - jms:Connection connection = check jms:createConnection({ - initialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", - providerUrl: "tcp://localhost:61616" - }); + jms:Connection connection = check new ( + initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory", + providerUrl = "tcp://localhost:61616" + ); jms:Session session = check connection->createSession({acknowledgementMode: "AUTO_ACKNOWLEDGE"}); jms:Destination queue = check session->createQueue("MyQueue"); jms:MessageConsumer consumer = check session.createConsumer(queue);