That's not how JMX is used. You have to continue to use the
MBeanServerConnection.
try using the invoke operation to call the methods on the interface:
see:
http://java.sun.com/j2ee/1.4/docs/api/javax/management/MBeanServerConnection.html#invoke(javax.management.ObjectName,%20java.lang.String,%20java.lang.Object[],%20java.lang.String[])
On 5/10/07, Jiang <[EMAIL PROTECTED]> wrote:
I start ActiveMQ on 10.4.1.64 (expose jmxrmi at 1099) . I want to add
queue/topic to the server from my pc (10.4.1.60) . Code is below :
jmxUrl = new
JMXServiceURL("service:jmx:rmi:///jndi/rmi://10.4.1.64:1099/jmxrmi");
JMXConnector jmxc = JMXConnectorFactory.connect(jmxUrl);
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
ObjectName mBeanName = new
ObjectName("org.apache.activemq:BrokerName=localhost,Type=Broker");
MBeanInfo mBeanInfo = mbsc.getMBeanInfo(mBeanName);
the mBeanInfo is get successfully. And in debug console , I can see the
className of mBeanInfo is BrokerView.
How can I create one BrokerView object that presents the object just run in
the ActiveMQ Server. Then I can use
addQueue or addTopic of the BrokerView object to add queue/topic to the
ActiveMQ server remotely.???
Thanks .
--
View this message in context:
http://www.nabble.com/How-to-create-BrokerView-object-tf3721428s2354.html#a10412673
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
--
Regards,
Hiram
Blog: http://hiramchirino.com