Skip to content

Instantly share code, notes, and snippets.

@imageaid
Created December 4, 2010 23:39
Show Gist options
  • Save imageaid/728606 to your computer and use it in GitHub Desktop.
Save imageaid/728606 to your computer and use it in GitHub Desktop.
Messaging configuration file for communicating from Railo, via BlazeDS to ActiveMQ
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage">
<adapters>
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter"/>
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
<channel ref="my-polling-amf"/>
<channel ref="my-streaming-amf"/>
</default-channels>
<destination id="JMSAnnouncements" channels="my-amf">
<adapter ref="jms"/>
<channels>
<channel ref="my-amf"/>
<channel ref="my-streaming-amf"/>
</channels>
<properties>
<server>
<max-cache-size>1000</max-cache-size>
<durable>false</durable>
</server>
<jms>
<destination-type>Topic</destination-type>
<message-type>javax.jms.ObjectMessage</message-type>
<connection-factory>java:comp/env/jms/flex/TopicConnectionFactory</connection-factory>
<destination-jndi-name>java:comp/env/jms/announcements</destination-jndi-name>
<delivery-mode>PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<!--max-producers>1</max-producers-->
<initial-context-environment>
<property>
<name>Context.SECURITY_PRINCIPAL</name>
<value>anonymous</value>
</property>
<property>
<name>Context.SECURITY_CREDENTIALS</name>
<value>anonymous</value>
</property>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>tcp://localhost:61616</value>
</property>
</initial-context-environment>
</jms>
</properties>
</destination>
<destination id="JMSMessages" channels="my-amf">
<adapter ref="jms"/>
<channels>
<channel ref="my-amf"/>
<channel ref="my-streaming-amf"/>
</channels>
<properties>
<server>
<max-cache-size>1000</max-cache-size>
<durable>false</durable>
</server>
<jms>
<destination-type>Topic</destination-type>
<message-type>javax.jms.ObjectMessage</message-type>
<connection-factory>java:comp/env/jms/flex/TopicConnectionFactory</connection-factory>
<destination-jndi-name>java:comp/env/jms/messages</destination-jndi-name>
<delivery-mode>PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<max-producers>1</max-producers>
<initial-context-environment>
<property>
<name>Context.SECURITY_PRINCIPAL</name>
<value>anonymous</value>
</property>
<property>
<name>Context.SECURITY_CREDENTIALS</name>
<value>anonymous</value>
</property>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>tcp://localhost:61616</value>
</property>
</initial-context-environment>
</jms>
</properties>
</destination>
</service>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment