Commit ff7add53 authored by afreyssin's avatar afreyssin

Handling correlationIDAsBytes from Rest message.

Termination enhancements.
parent 3722f7ff
...@@ -196,7 +196,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -196,7 +196,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
// Initializes Rest client and target // Initializes Rest client and target
try { try {
// TODO (AF): It seems that there is no exceptions thrown by these methods. // It seems that there is no exceptions thrown by these methods.
client = ClientBuilder.newClient( client = ClientBuilder.newClient(
new ClientConfig() // TODO (AF): Fix these properties with configuration values new ClientConfig() // TODO (AF): Fix these properties with configuration values
.property(ClientProperties.CONNECT_TIMEOUT, connectTimeout) .property(ClientProperties.CONNECT_TIMEOUT, connectTimeout)
...@@ -479,10 +479,9 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -479,10 +479,9 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
} }
if (header.containsKey("CorrelationIDAsBytes")) { if (header.containsKey("CorrelationIDAsBytes")) {
// TODO "CorrelationIDAsBytes" msg.setJMSCorrelationIDAsBytes((byte[]) header.get("CorrelationIDAsBytes"));
if (logger.isLoggable(BasicLevel.WARN)) if (logger.isLoggable(BasicLevel.WARN))
logger.log(BasicLevel.WARN, logger.log(BasicLevel.DEBUG, "-- CorrelationIDAsBytes = " + header.get("CorrelationIDAsBytes"));
"RESTAcquisitionAsync.setJMSMessageHeader -- TODO CorrelationIDAsBytes");
} }
// TODO (AF): Is it correct? The destination should correspond to the current destination. // TODO (AF): Is it correct? The destination should correspond to the current destination.
...@@ -745,8 +744,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -745,8 +744,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
try { try {
Response response = client.target(uriCloseConsumer).request().accept(MediaType.TEXT_PLAIN).delete(); Response response = client.target(uriCloseConsumer).request().accept(MediaType.TEXT_PLAIN).delete();
if (logger.isLoggable(BasicLevel.DEBUG)) if (logger.isLoggable(BasicLevel.DEBUG))
// TODO (AF): remove stacktrace logger.log(BasicLevel.DEBUG, "RestDistribution.closeConsumer(): -> " + response.getStatus());
logger.log(BasicLevel.DEBUG, "RestDistribution.closeConsumer(): -> " + response.getStatus(), new Exception());
} catch (Exception exc) { } catch (Exception exc) {
logger.log(BasicLevel.ERROR, "RestDistribution.closeConsumer()", exc); logger.log(BasicLevel.ERROR, "RestDistribution.closeConsumer()", exc);
return; return;
...@@ -855,6 +853,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -855,6 +853,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
@Override @Override
public synchronized void stop() { public synchronized void stop() {
logger.log(BasicLevel.ERROR, "RestAcquisitionAsync.Daemon.stop()", new Exception()); logger.log(BasicLevel.ERROR, "RestAcquisitionAsync.Daemon.stop()", new Exception());
super.stop();
} }
@Override @Override
...@@ -865,7 +864,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -865,7 +864,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
@Override @Override
protected void shutdown() { protected void shutdown() {
// TODO (AF): force jersey to close // TODO (AF): force jersey to close
close();
} }
} }
} }
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