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
d01f6c9f
Commit
d01f6c9f
authored
Feb 03, 2011
by
Guillaume Surrel
Browse files
Prevent default exchange deletion.
parent
0db8df15
Changes
1
Hide whitespace changes
Inline
Side-by-side
mom-amqp/org.ow2.joram.mom.amqp/src/main/java/org/ow2/joram/mom/amqp/IExchange.java
View file @
d01f6c9f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2009 ScalAgent Distributed Technologies
* Copyright (C) 2009
- 2011
ScalAgent Distributed Technologies
* Copyright (C) 2009 CNES
*
* This library is free software; you can redistribute it and/or
...
...
@@ -31,6 +31,7 @@ import java.util.Set;
import
org.objectweb.util.monolog.api.BasicLevel
;
import
org.objectweb.util.monolog.api.Logger
;
import
org.ow2.joram.mom.amqp.exceptions.AccessRefusedException
;
import
org.ow2.joram.mom.amqp.exceptions.NoConsumersException
;
import
org.ow2.joram.mom.amqp.exceptions.NotFoundException
;
import
org.ow2.joram.mom.amqp.exceptions.TransactionException
;
...
...
@@ -153,9 +154,12 @@ public abstract class IExchange implements Serializable {
}
}
protected
final
void
deleteExchange
()
{
protected
final
void
deleteExchange
()
throws
AccessRefusedException
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
"IExchange.deleteExchange("
+
name
+
')'
);
if
(
name
.
equals
(
DEFAULT_EXCHANGE_NAME
))
{
throw
new
AccessRefusedException
(
"Can't delete default exchange."
);
}
if
(
durable
)
{
transaction
.
delete
(
saveName
);
}
...
...
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