Hi,

try using queue.TEST.Q1 for JNDI name

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Nov 23, 2009 at 2:34 PM, miten <miten.me...@morganstanley.com>wrote:

>
> Hi,
>
> I created physical queue using:
>
> <destinations>
>      <queue physicalName="TEST.Q1" />
>      <topic physicalName="TEST.T1" />
>    </destinations>
>
> Using admin view I can see the queue (queue://TEST.Q1) and send message and
> read using console.
>
> I am trying to read using MDB in spring and I cannot get jndi lookup to
> identify the queue.  Probably some config below needs correction.  Please
> guide.
>
> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
>    <property name="environment">
>      <props>
>        <prop key="java.naming.factory.initial">
>          org.apache.activemq.jndi.ActiveMQInitialContextFactory
>        </prop>
>      </props>
>    </property>
>  </bean>
>  <bean id="appJmsDestination"
>    class="org.springframework.jndi.JndiObjectFactoryBean">
>    <property name="jndiTemplate">
>      <ref bean="jndiTemplate"/>
>    </property>
>    <property name="jndiName" value="TEST.Q1"/>
>  </bean>
> <bean id="connectionFactory"
>      class="org.apache.activemq.ActiveMQConnectionFactory">
>        <property name="brokerURL">
>           <value>tcp://localhost:61616</value>
>        </property>
>    </bean>
>
> <bean id="jmsContainer"
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>    <property name="connectionFactory" ref="connectionFactory"/>
>    <property name="destination" ref="appJmsDestination"/>
>    <property name="messageListener" ref="messageListener" />
> </bean>
>
> Regards,
>
> Miten.
> --
> View this message in context:
> http://old.nabble.com/physical-queue-cannot-be-resolved-using-jndi---spring-tp26478123p26478123.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Reply via email to