I will give that a try and post back with the results.   Am I correct in
assuming that, at least after a cursory review, it looks like this *should*
work?  For example, there's nothing flagrantly wrong with the peer URI?  
Should it be the same URI in both peers (I assume so).  There's no explicit
broker configuration that needs be done? 

Thanks for taking a look at this, Rob.

-chris


Hi new2mq,

I wonder if you're running into some gotcha's with the Spring  
JmsTemplate - and that you should be using a PooledConnectionFactory -  
see http://activemq.apache.org/spring-support.html
- to avoid the peer:// protocol from having to create its embedded  
broker, establish its network connection, search for other peers etc  
for every message - for every message sent, received etc.

cheers,

Rob

{ ... intro snipped .. }
> Here's my Spring config:
> ////////////////////////
> // spring-config.xml
> ///////////////////////
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd";>
> <beans>
>    <bean id="jmsTopicConnectionFactory"
>   class="org.apache.activemq.ActiveMQConnectionFactory">
>        <property name="brokerURL">
>            <value>peer://mygroupname/mybrokername</value>
>        </property>
>    </bean>    
>
>    <bean id="TestTopic"  
> class="org.apache.activemq.command.ActiveMQTopic">
>        <constructor-arg>
>            <value>TestTopic</value>
>        </constructor-arg>     
>    </bean>
>
>
>    <bean id="SenderBean" class="com.ssi.exp.TestMessageSender">               
>         
>        <property name="jmsTemplate">
>            <ref bean="TestTopicJmsTemplate"/>
>        </property>
>    </bean>            
>
>    <bean id="MessageListener"  
> class="com.ssi.exp.TestMessageListener" />
>
>    <bean id="TestJmsTopicListenerContainer"
> class 
> = 
> "org.springframework.jms.listener.DefaultMessageListenerContainer102">
>        <property name="concurrentConsumers">
>            <value>1</value>
>        </property>
>        <property name="connectionFactory"  
> ref="jmsTopicConnectionFactory"/>
>        <property name="destination" ref="TestTopic" />
>        <property name="messageListener" ref="MessageListener" />
>        <property name="pubSubDomain">
>            <value>true</value>
>        </property>
>    </bean>            
>
>    <bean id="TestTopicJmsTemplate"
> class="org.springframework.jms.core.JmsTemplate102">
>        <property name="connectionFactory">
>            <ref bean="jmsTopicConnectionFactory" />
>        </property>
>        <property name="defaultDestination">
>            <ref bean="TestTopic" />
>        </property>
>        <property name="pubSubDomain">
>            <value>true</value>
>        </property>
>    </bean>
> </beans>              
>
{ ... code sample snipped .. }
-- 
View this message in context: 
http://www.nabble.com/Problems-with-simple-peer%3A---transport-config---Spring-tp18755772p18774090.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to