views:

495

answers:

1

I have the spring-flex-testdrive example (JMS chat application which uses a Topic to pub/sub messages) to work on Tomcat with ActiveMQ now I want to run this example on Glassfish with OpenMQ.

This is a related sample config I found online but it doesn't quite work for the Flex/Glassfish/OpenMQ/BlazeDs/Spring-Integration technology combination. (Link)

I can deploy it on Glassfish but it can't connect to the destination. I've seen forums mention just replace ActiveMQ with OpenMQ classes/bean declarations but that does not appear to be the case. How do you configure the web-application-context.xml for OpenMQ? What are the common gotcha's?

Thanks.

+1  A: 
<bean id="connectionFactory" class="CustomOpenMqConnectionFactoryBean">
 <property name="imqAddressList" value="localhost:7676" />
 <property name="imqDefaultUsername" value="admin" />
 <property name="imqDefaultPassword" value="admin" />
</bean>

<bean id="chatTopic" class="com.sun.messaging.Topic">
 <constructor-arg type="java.lang.String" value="cTopic"/>
</bean>
RC