activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: JBOSS and activeMQ - JNDI lookup
Date Mon, 30 Nov 2009 16:10:54 GMT
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.colombo@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message