Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
e216871e
Commit
e216871e
authored
Mar 09, 2020
by
Andre Freyssinet
Browse files
Validates consumers after messages reloading (needed by BatchEngine and
batchNetwork consumers, cf. JMQ-184).
parent
b0c8efd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
joram/a3/rt/src/main/java/fr/dyade/aaa/agent/AgentServer.java
View file @
e216871e
/*
* Copyright (C) 2001 - 20
19
ScalAgent Distributed Technologies
* Copyright (C) 2001 - 20
20
ScalAgent Distributed Technologies
* Copyright (C) 2004 France Telecom R&D
* Copyright (C) 1996 - 2000 BULL
* Copyright (C) 1996 - 2000 INRIA
...
...
@@ -1422,15 +1422,21 @@ public final class AgentServer {
try
{
// then restores all messages.
String
[]
list
=
transaction
.
getList
(
"@"
);
// BatchEngine and BatchNetwork need a global validate operation after insertion.
Vector
<
MessageConsumer
>
toValidate
=
new
Vector
<
MessageConsumer
>();
for
(
int
i
=
0
;
i
<
list
.
length
;
i
++)
{
Message
msg
=
Message
.
load
(
list
[
i
]);
if
(
msg
.
getSource
()
==
serverId
)
{
// The update has been locally generated, the message is ready to
//
deliver to its
consumer (Engine or Network component). So we have
//
to insert it in the queue
of this consumer.
// The update has been locally generated, the message is ready to
deliver to its
// consumer (Engine or Network component). So we have
to insert it in the queue
// of this consumer.
try
{
getServerDesc
(
msg
.
getDest
()).
getDomain
().
insert
(
msg
);
MessageConsumer
cons
=
getServerDesc
(
msg
.
getDest
()).
getDomain
();
cons
.
insert
(
msg
);
// BatchEngine and BatchNetwork need a global validate operation after insertion.
if
(!
toValidate
.
contains
(
cons
))
toValidate
.
add
(
cons
);
}
catch
(
UnknownServerException
exc
)
{
logmon
.
log
(
BasicLevel
.
ERROR
,
getName
()
+
", discard message to unknown server id#"
+
...
...
@@ -1461,6 +1467,9 @@ public final class AgentServer {
continue
;
}
}
// BatchEngine and BatchNetwork need a global validate operation after insertion.
for
(
MessageConsumer
cons
:
toValidate
)
cons
.
validate
();
}
catch
(
ClassNotFoundException
exc
)
{
logmon
.
log
(
BasicLevel
.
FATAL
,
getName
()
+
", can't restore messages"
,
exc
);
...
...
Write
Preview
Supports
Markdown
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