Commit 5c03b0c1 authored by Andre Freyssinet's avatar Andre Freyssinet

Minor changes and bug fixes.

parent 2a6b2f83
......@@ -11,6 +11,8 @@ public class Consumer {
public static void main(String[] args) {
String queueName = System.getProperty("queue");
if ((queueName == null) || queueName.isEmpty())
queueName = "queue";
RestConsumer cons = new RestConsumer("http://localhost:8989/joram/", queueName);
// cons.debug = true;
......
......@@ -6,6 +6,8 @@ public class Producer {
public static void main(String[] args) {
String queueName = System.getProperty("queue");
if ((queueName == null) || queueName.isEmpty())
queueName = "queue";
RestProducer prod = new RestProducer("http://localhost:8989/joram/", queueName);
// prod.debug = true;
......
......@@ -37,7 +37,7 @@ public class RestConsumer {
System.out.println("Use Rest/JMS interface: " + target.getUri());
// lookup the destination
Builder builder = target.path("jndi").path("queue").request();
Builder builder = target.path("jndi").path(dest).request();
Response response = builder.accept(MediaType.TEXT_PLAIN).head();
System.out.println("Lookup \"" + dest + "\" -> " + response.getStatus());
......
......@@ -32,8 +32,8 @@ public class RestProducer {
RestProducer(String uri, String dest) {
URI base = UriBuilder.fromUri(uri).build();
client = ClientBuilder.newClient(new ClientConfig());
WebTarget target = client.target(base);
WebTarget target = client.target(base);
System.out.println("Use Rest/JMS interface: " + target.getUri());
// lookup the destination
......@@ -47,6 +47,7 @@ public class RestProducer {
// .queryParam("name", "prod1")
.getUri();
// Create the producer
response = client.target(uriCreateProd)
.request()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment