Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
joram
joram
Commits
ff7add53
Commit
ff7add53
authored
Oct 04, 2017
by
afreyssin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling correlationIDAsBytes from Rest message.
Termination enhancements.
parent
3722f7ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
...m/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
+6
-7
No files found.
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
View file @
ff7add53
...
@@ -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
();
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment