I have set up servicemix and jboss as separate processes on my machine.
I have used the bean.xml below to setup a basic scenario which listens on a
jboss queue and forwards messages received to another jboss queue.

The onyl outstanding issue, that I have is that the messages must be xml.
If anyone knows how to configure support for binary messages, please let me
know.
ideally, this should be attainable though configuration without having to
write a custom class.

I am deploying onto the servicemix-jms component, so I dont think that the
JmsMarshaler is being used, however I noticed that it does not implement the
Marshaler interface.

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
        xmlns:eai="http://www.abc.co.za/eai/servicemix/JBossMQ-Bridge";>

        <classpath>
                <location>.</location>
                <location>lib/jbossall-client-3.2.5.jar</location>
        </classpath>

        <jms:endpoint service="eai:jbossMqConsumer"
                endpoint="jbossMqConsumer" targetService="eai:jbossMqProvider"
                role="consumer" 
defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
                destinationStyle="queue"
                connectionFactory="#jbossQueueConnectionFactory"
                destination="#jbossQueueA" />

        <jms:endpoint service="eai:jbossMqProvider"
                endpoint="jbossMqProvider" role="provider" 
destinationStyle="queue"
                connectionFactory="#jbossQueueConnectionFactory"
                destination="#jbossQueueB" />

        <bean id="jndiTemplate"
                class="org.springframework.jndi.JndiTemplate">
                <property name="environment">
                        <props>
                                <prop key="java.naming.factory.initial">
                                        org.jnp.interfaces.NamingContextFactory
                                </prop>
                                <prop key="java.naming.provider.url">
                                        localhost:2099
                                </prop>
                                <prop key="java.naming.factory.url.pkgs">
                                        org.jnp.interfaces:org.jboss.naming
                                </prop>
                        </props>
                </property>
        </bean>

        <bean id="jbossQueueConnectionFactory"
                class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiTemplate">
                        <ref bean="jndiTemplate" />
                </property>
                <property name="jndiName">
                        <value>ConnectionFactory</value>
                </property>
        </bean>

        <bean id="jbossQueueA"
                class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiTemplate">
                        <ref bean="jndiTemplate" />
                </property>
                <property name="jndiName">
                        <value>queue/A</value>
                </property>
        </bean>

        <bean id="jbossQueueB"
                class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiTemplate">
                        <ref bean="jndiTemplate" />
                </property>
                <property name="jndiName">
                        <value>queue/B</value>
                </property>
        </bean>

        <bean id="jmsTemplate"
                class="org.springframework.jms.core.JmsTemplate">
                <property name="connectionFactory">
                        <ref bean="jbossQueueConnectionFactory" />
                </property>
                <property name="defaultDestination">
                        <ref bean="jbossQueueA" />
                </property>
                <property name="receiveTimeout">
                        <value>30000</value>
                </property>
        </bean>
</beans>

-- 
View this message in context: 
http://www.nabble.com/external-jbossmq-tf3135837s12049.html#a8689190
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to