Re: how to lookup a topicName dynamically

2007-03-29 Thread Adrian Co
Well, it really depends on what you what to do with the destination information. You could use the ObjectName to query the mbeanserver to obtain stat info about that particular destination. I think the Destination Object Name contains the Destination attribute, which is actually the destinat

Re: how to lookup a topicName dynamically

2007-03-29 Thread new2activemq
I was able to access the getTopics method of BrokerViewMBean by using the "invoke" method on a MBeanServerObject. However, the problem now is that the getTopics() method returns an ObjectName[] however the "invoke" method I used does not expect an ObjectName[]. If I try simple casting the error go

Re: how to lookup a topicName dynamically

2007-03-29 Thread Adrian Co
You have to use JMX to access it and enable JMX in activemq. http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/tutorialTOC.html new2activemq wrote: Thanks! That really helps me in putting the effort in the right direction. I think in my environment we fall under the second cateogory mentio

Re: how to lookup a topicName dynamically

2007-03-29 Thread new2activemq
Thanks! That really helps me in putting the effort in the right direction. I think in my environment we fall under the second cateogory mentioned below - we are accessing remote broker. Also, in my JMX console window... under "org.apache.activemq" --> "localhost" --> "Broker" --> "Info" I can see

Re: how to lookup a topicName dynamically

2007-03-28 Thread Adrian Co
IMO, using BrokerService.getDestinations() will only work when you are using embedded brokers. I.e. you are deploying the JMS broker inside your app and you have access to the BrokerService object. If you want to access a remote broker (i.e. if you run it via ./activemq), you need to use JMX a

Re: how to lookup a topicName dynamically

2007-03-28 Thread new2activemq
James, thanks a lot for your help below. i was actually able to try the list() method and it lists everything that's in my jndi.properties file. i think the reason is that my InitalContext in the first place does a 'lookup' in the jndi.properties file. however, lets say my activemq broker is run

Re: how to lookup a topicName dynamically

2007-03-27 Thread James Strachan
try the JNDI javadoc http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/InitialContext.html#list(java.lang.String) or a Sun tutorial on JNDI On 3/22/07, new2activemq <[EMAIL PROTECTED]> wrote: Hi, I am trying to write a debug tool where as a user, I do not know the topicNames that exist. N