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);