On 5/16/07, Jiang <[EMAIL PROTECTED]> wrote:
bsnyder thanks a lot .The example you shown works well. But I still have a
question: In ActiveMQ , there is a broker.jmx package , in this package
there are a lot of classes such as BrokerView/QueryView and so on. I think
if I use these classes many things will be easiyer. For example
DestinationView class , it has many method to use .But its constructor has
a ManagedRegionBroker , I don't no how to create one ManagedRegionBroker
object(Its constructor is so complex , it need BrokerService and so on) . I
do wonder whether I can use these classes to meet the need I mentioned
before(addTopic/removeTopic ...).
public DestinationView(ManagedRegionBroker broker, Destination destination){
this.broker = broker;
this.destination=destination;
}
The View objects you mention are part of the ActiveMQ internals and
are the actual MBeans that are get registered with the MBeanServer for
various items internal to the ActiveMQ core architecture. These
objects are not public JMX management APIs for ActiveMQ. The example
that I provided demonstrates the use of the MBeanServerConnection to
query for MBeans and to invoke methods. This is exactly what you
should be using to mange ActiveMQ via JMX.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/