Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Jul 24, 2023
1 parent 0f51f48 commit ba6ab0e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit ba6ab0e

Please sign in to comment.