activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From miten <Miten.Me...@morganstanley.com>
Subject physical queue cannot be resolved using jndi / spring
Date Mon, 23 Nov 2009 13:34:36 GMT

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.


Mime
View raw message