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
2d76f66b
Commit
2d76f66b
authored
Jul 27, 2017
by
afreyssin
Browse files
Use DestinationConstants shared definition.
parent
bb21d44b
Changes
1
Hide whitespace changes
Inline
Side-by-side
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/DistributionTopic.java
View file @
2d76f66b
...
...
@@ -28,6 +28,7 @@ import java.util.Properties;
import
org.objectweb.joram.mom.notifications.ClientMessages
;
import
org.objectweb.joram.mom.notifications.WakeUpNot
;
import
org.objectweb.joram.mom.util.DMQManager
;
import
org.objectweb.joram.shared.DestinationConstants
;
import
org.objectweb.joram.shared.MessageErrorConstants
;
import
org.objectweb.joram.shared.excepts.MessageValueException
;
import
org.objectweb.joram.shared.excepts.RequestException
;
...
...
@@ -86,11 +87,11 @@ public class DistributionTopic extends Topic {
if
(
firstTime
)
{
if
(
properties
!=
null
)
{
distributionClassName
=
properties
.
getProperty
(
D
i
st
ributionModule
.
CLASS_NAME
);
properties
.
remove
(
D
i
st
ributionModule
.
CLASS_NAME
);
distributionClassName
=
properties
.
getProperty
(
D
e
st
inationConstants
.
DISTRIBUTION_
CLASS_NAME
);
properties
.
remove
(
D
e
st
inationConstants
.
DISTRIBUTION_
CLASS_NAME
);
}
if
(
distributionClassName
==
null
)
{
throw
new
RequestException
(
"Distribution class name not found: "
+
D
i
st
ributionModule
.
CLASS_NAME
throw
new
RequestException
(
"Distribution class name not found: "
+
D
e
st
inationConstants
.
DISTRIBUTION_
CLASS_NAME
+
" property must be set on topic creation."
);
}
...
...
@@ -117,9 +118,9 @@ public class DistributionTopic extends Topic {
}
private
boolean
isAsyncDistribution
(
Properties
properties
)
{
if
(
properties
.
containsKey
(
D
i
st
ributionQueue
.
ASYNC_DISTRIBUTION_OPTION
))
{
if
(
properties
.
containsKey
(
D
e
st
inationConstants
.
ASYNC_DISTRIBUTION_OPTION
))
{
try
{
return
ConversionHelper
.
toBoolean
(
properties
.
get
(
D
i
st
ributionQueue
.
ASYNC_DISTRIBUTION_OPTION
));
return
ConversionHelper
.
toBoolean
(
properties
.
get
(
D
e
st
inationConstants
.
ASYNC_DISTRIBUTION_OPTION
));
}
catch
(
MessageValueException
exc
)
{
logger
.
log
(
BasicLevel
.
ERROR
,
"DistributionModule: can't parse DaemonDistribution option."
,
exc
);
}
...
...
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