This is xbean.xml file for queue read and write with external Jboss MQ:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
       xmlns:cp="http://www.servicemix.com/mdm/clientprovisioning_1.0";>
               
        <jms:endpoint service="cp:jms-out-request" endpoint="endpoint"
                role="provider"
                destinationStyle="queue"
                needJavaIdentifiers="true" 
                destination="#cpAssistedRequestQueue"
                connectionFactory="#jbossConnectionFactory" />

        <jms:endpoint service="cp:jms-in-status" endpoint="endpoint"
                targetService="cp:pipeline-mdm-soap"
                role="consumer"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
                destinationStyle="queue"
                destination="#cpAssistedStatusQueue"
                connectionFactory="#jbossConnectionFactory" />
               
        <jms:endpoint service="cp:jms-in-response" endpoint="endpoint"
                targetService="cp:pipeline-mdm-soap"
                role="consumer"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
                destinationStyle="queue"
                destination="#cpAssistedResponseQueue"
                connectionFactory="#jbossConnectionFactory" />         

        <jms:endpoint service="cp:jms-out-reply" endpoint="endpoint"
                role="provider"
                destinationStyle="queue"
                needJavaIdentifiers="true" 
                destination="#cpAssistedReplyQueue"
                connectionFactory="#jbossConnectionFactory" />

  <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
      <property name="environment">
          <props>
              <prop
key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
              <prop key="java.naming.provider.url">localhost:1099</prop>
              <prop
key="java.naming.factory.url.pkgs">org.jnp.interfaces:org.jboss.naming</prop>
          </props>
      </property>
  </bean>

  <bean id="jbossConnectionFactory"
          class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiTemplate">
        <ref bean="jndiTemplate"/>
      </property>
      <property name="jndiName">
          <value>ConnectionFactory</value>
      </property>
  </bean>

  <bean id="cpAssistedRequestQueue"
        class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiTemplate">
          <ref bean="jndiTemplate"/>
      </property>
      <property name="jndiName">
          <value>clientprovisioning/assisted/request</value>
      </property>
  </bean>

  <bean id="cpAssistedStatusQueue"
        class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiTemplate">
          <ref bean="jndiTemplate"/>
      </property>
      <property name="jndiName">
          <value>clientprovisioning/assisted/status</value>
      </property>
  </bean>
 
  <bean id="cpAssistedResponseQueue"
        class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiTemplate">
          <ref bean="jndiTemplate"/>
      </property>
      <property name="jndiName">
          <value>clientprovisioning/assisted/response</value>
      </property>
  </bean> 

  <bean id="cpAssistedReplyQueue"
        class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiTemplate">
          <ref bean="jndiTemplate"/>
      </property>
      <property name="jndiName">
          <value>clientprovisioning/assisted/reply</value>
      </property>
  </bean>
               
</beans>

Anders Hammar wrote:
> 
> For my JMS SU I'd like to look up the (queue) destination from JNDI, but I
> can't figure out how to define this in my jndi.xml file. Does anyone know?
> 
> This is my xbean.xml for the JMS SU:
> 
>     <jms:endpoint service="abc:MyConsumerService"
>                   endpoint="jms"
>                   targetService="abc:MyTargetService"
>                   role="consumer" 
>                   jndiDestinationName="java:comp/env/jms/MyDestination"
>                   jndiConnectionFactoryName="java:comp/env/jms/MyCF"
>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-only"; />
> 
> I'm using the SpringInitialContextFactory. I've got the connection factory
> configured and working, but can't find any examples of a destination from
> JNDI.
> 
> Thanks,
> /Anders
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-define-queue-topic-destination-in-JNDI-tf2423077.html#a6875666
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to