• Activemq Tomcat 配置


    Spring   web.xml:

        <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">  
            <property name="jndiName" value="${jms.jndi.connectionfactory}"></property> 
        </bean>
        
    <!--     Queue   -->
        <bean id="outgingDestination" class="org.springframework.jndi.JndiObjectFactoryBean">  
            <property name="jndiName" value="${jms.outgoing.destination}"></property>  
        </bean>   
        
        <bean id="incomingDestination" class="org.springframework.jndi.JndiObjectFactoryBean">  
            <property name="jndiName" value="${jms.incoming.destination}"></property>
        </bean>   

    jms.properties:

    jms.receive.timeout=5000
    
    jms.jndi.connectionfactory=java:comp/env/jms/NormalConnectionFactory
    
    jms.incoming.destination=java:comp/env/jms/queue/channel0
    
    jms.outgoing.destination=java:comp/env/jms/queue/channel1

    tomcat  conf/context.xml  (Eclipse Servers) :

    <Resource name="jms/NormalConnectionFactory" auth="Container"
            type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory"
            factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="tcp://10.135.63.33:61616"
            brokerName="localhost" userName="system" password="manager"
            useAsyncSend="true" useEmbeddedBroker="false" />
        <Resource name="jms/queue/channel0" auth="Container"
            type="org.apache.activemq.command.ActiveMQQueue" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
            physicalName="test.queue" />
    
        <Resource name="jms/queue/channel1" auth="Container"
            type="org.apache.activemq.command.ActiveMQQueue" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
            physicalName="test.replyqueue" />
  • 相关阅读:
    学习 | mockjs入门
    学习 | 基于require.js的三级联动菜单【入门】
    Android_百度地图基本用法5
    Android_百度地图基本用法4
    Android_百度地图基本用法3
    Android_百度地图基本用法2
    Android_百度地图基本用法1
    Android_Event Bus 的基本用法
    Kotlin基础-扩展
    Kotlin基础-泛型
  • 原文地址:https://www.cnblogs.com/shaman/p/2961941.html
Copyright © 2020-2023  润新知