Bugs item #511024, was opened at 2002-01-30 19:11
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=511024&group_id=22866
Category: JBossMQ
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Wenwei Jiang (jww)
>Assigned to: Jason Dillon (user57)
Summary: Exception when destroying Topic or Queue
Initial Comment:
JBossMQ throws exception when destroying Topic or
Queue.
JBossMQService.java
public void destroyTopic(String name) throws Exception
{
try
{
ObjectName topic = getTopicObjectName(name);
getServer().invoke(getServiceControllerName(),
"undeploy",
new Object[] {topic},
new String[]
{"javax.management.ObjectName"});
}
catch (Exception e)
{
log.warn("Could not destroy the
destination: ", e);
throw e;
}
}
But ServiceControllerMean doesn't expose "undeploy"
method.
----------------------------------------------------------------------
Comment By: Jeff Tulley (jtulley)
Date: 2002-02-11 13:08
Message:
Logged In: YES
user_id=341242
I also missed one line from each destroy method,
getServer().unregisterMBean(queue);
and
getServer().unregisterMBean(topic);
These need to be added after the respective destroy queue
or destroy topic invocations. These lines once existed in
this code but were commented out when the invocations above
were changed to "undeploy". Maybe we are dealing with code
that is in flux, or maybe the undeploy is a mistake, I
don't have the history to know which is the case.
Now, upon repeated creation of a queue with the same name
after it was destroyed, you get a "Couldn't add queue This
destination already exists !" error. This is the result
of "stopService" not being implemented yet in QueueManager
and TopicManager. (They should make some sort of call that
is the opposite of the server.addDestination in
startService. So, this code is unfinished, and once again
I do not have the history(or experience with JMS in this
case) to know what should go here.
----------------------------------------------------------------------
Comment By: Jeff Tulley (jtulley)
Date: 2002-02-08 13:25
Message:
Logged In: YES
user_id=341242
Should this not be a stop, then a destroy instead, in both
the case of Topics, as well as Queues?
Here is the diff:
diff -u -r1.11 JBossMQService.java
--- JBossMQService.java 3 Jan 2002 04:00:54 -0000 1.11
+++ JBossMQService.java 8 Feb 2002 21:23:10 -0000
@@ -199,10 +199,13 @@
{
try
{
-
ObjectName queue = getQueueObjectName(name);
getServer().invoke(getServiceControllerName(),
- "undeploy",
+ "stop",
+ new Object[] {queue},
+ new String[] {"javax.management.ObjectName"});
+ getServer().invoke(getServiceControllerName(),
+ "destroy",
new Object[] {queue},
new String[] {"javax.management.ObjectName"});
@@ -233,7 +236,11 @@
//getServer().invoke(topic, "stop", new Object[]
{}, new String[]{});
//getServer().unregisterMBean(topic);
getServer().invoke(getServiceControllerName(),
- "undeploy",
+ "stop",
+ new Object[] {topic},
+ new String[] {"javax.management.ObjectName"});
+ getServer().invoke(getServiceControllerName(),
+ "destroy",
new Object[] {topic},
new String[] {"javax.management.ObjectName"});
}
I have not yet run the testsuite with this change in place,
or any code that deletes a simple queue and/or topic. I'll
do that ASAP.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=511024&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development