Announcement Announcement Module
Collapse
No announcement yet.
Providing ConnectionFactory to DMLC Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Providing ConnectionFactory to DMLC

    Hi All,

    I am using Spring3.1

    My target is connecting to remote topic server(placed on jboss server 4) in a cluster mode.
    the jms in the remote cluster is Jboss messaging.

    I have configured DMLC:

    Code:
    <bean id="TgwListenerDLMC"
    		class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    		<property name="connectionFactory" ref="jboss messaging connectionFactory" />    // how to do it??
    		<property name="pubSubDomain" value="true" />
    		<property name="destinationResolver" ref="destinationResolver" />
    		<property name="concurrentConsumers" value="1" />
    		<property name="destinationName" value="${topic.destinationName}" />
    		<property name="messageListener" ref="TgwMDB" />
    		<property name="recoveryInterval" value="10000" />
    	</bean>

    Code:
    thats the destination resolver:
    
    <bean id="destinationResolver"
    		class="org.springframework.jms.support.destination.JndiDestinationResolver">
    		<property name="jndiTemplate" ref="jndiTemplate" />
    		<property name="cache" value="true" />
    		<!--
    			do not create a dynamic destination if the destination name is not
    			found in JNDI
    		-->
    		<property name="fallbackToDynamicDestination" value="false" />
    	</bean>
    
    
    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    		<property name="environment">
    			<props>
    				<prop key="java.naming.factory.initial">${java.naming.factory.initial}</prop>
    				<prop key="jnp.partitionName">${jnp.topicPartitionName}</prop>
    				<prop key="jnp.discoveryGroup">${jnp.topicDiscoveryGroup}</prop>
    			</props>
    		</property>
    	</bean>


    Now I need to give this DMLC a connectionFactory which is the same kind of the remote jboss server one.

    So I download jboss messaging jars. How will I integrate it within Spring xml configuration files and provide this DMLC the right ref?



    thanks,
    ray.

  • #2
    Remove messaging.jar, do jndi lookup for connection-factory and pass in that ref.

    Comment

    Working...
    X