You need to use the JBOSS jndi provider, that is: you need to lookup in the context that the objects are registered in.
2009/11/30 RJtokenlanring <ing.marco.colo...@gmail.com> > > Hi, after integrating activeMQ into JBOSS, I've tried the JNDI lookup. I > followed the istructions from: > http://activemq.apache.org/jndi-support.html > but I have some problems. Here is the error: > > ERROR [main] - javax.naming.NameNotFoundException: topic/RawDataTopic > > when i try: Topic topic = (Topic) context.lookup("topic/RawDataTopic"); > > but as you can see from AS log, > > 16:27:21,312 INFO [AdminObject] Bound admin object > 'org.apache.activemq.command.ActiveMQQueue' at 'queue/RawDataQueue' > 16:27:21,328 INFO [AdminObject] Bound admin object > 'org.apache.activemq.command.ActiveMQTopic' at 'topic/RawDataTopic' > > My activemq-jms-ds.xml looks like: > > ... > <mbean code="org.jboss.resource.deployment.AdminObject" > name="activemq.topic:name=RawDataTopic"> > <attribute name="JNDIName">topic/RawDataTopic</attribute> > <depends > > optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar'</depends> > <attribute name="Type">javax.jms.Topic</attribute> > <attribute > name="Properties">PhysicalName=topic/RawDataTopic</attribute> > </mbean> > ... > > and connection factoies are configured with: > > <use-java-context>false</use-java-context> > > context is configured as: > > > props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory"); > props.setProperty(Context.PROVIDER_URL,"tcp://hostname:61616"); > > > What is missing? > > Thank you and regards > -- > View this message in context: > http://old.nabble.com/JBOSS-and-activeMQ---JNDI-lookup-tp26576681p26576681.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com