Commit 5eb89a88 authored by afreyssin's avatar afreyssin
Browse files

Destination creation is no longer a static operation, it use now getWrapper administration wrapper.

parent a6366999
......@@ -358,7 +358,7 @@ public abstract class Destination extends AdministeredObject implements javax.jm
* @exception ConnectException If the administration connection is closed or broken.
* @exception AdminException If the request fails.
*/
protected static void doCreate(int serverId,
protected void doCreate(int serverId,
String name,
String className,
Properties props,
......@@ -369,7 +369,7 @@ public abstract class Destination extends AdministeredObject implements javax.jm
"Destination.doCreate(" + serverId + ',' + name + ',' + className + ',' + props + ',' + dest + ',' + type + ')');
CreateDestinationRequest cdr = new CreateDestinationRequest(serverId, name, className, props, type);
CreateDestinationReply reply = (CreateDestinationReply) AdminModule.doRequest(cdr);
CreateDestinationReply reply = (CreateDestinationReply) getWrapper().doRequest(cdr);
dest.agentId = reply.getId();
dest.adminName = name;
......
......@@ -248,7 +248,7 @@ public class Queue extends Destination implements javax.jms.Queue, QueueMBean {
String className,
Properties prop) throws ConnectException, AdminException {
Queue queue = new Queue();
doCreate(serverId, name, className, prop, queue, QUEUE_TYPE);
queue.doCreate(serverId, name, className, prop, queue, QUEUE_TYPE);
return queue;
}
......
......@@ -123,7 +123,7 @@ public class Topic extends Destination implements javax.jms.Topic, TopicMBean {
String className,
Properties prop) throws ConnectException, AdminException {
Topic topic = new Topic();
doCreate(serverId, name, className, prop, topic, TOPIC_TYPE);
topic.doCreate(serverId, name, className, prop, topic, TOPIC_TYPE);
return topic;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment