You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by dineshk <di...@prism.co.za> on 2006/05/31 17:08:55 UTC

Bridge ActiveMQ with another JMS Provider

Hi

I have a Java SE application which runs an ActiveMQ broker via embedded
ServiceMix and produces messages into a queue. The consumer application uses
another JMS implementation such as Mantaray. 

How do I configure servicemix.xml to bridge the different JMS Providers?

Regards,
Dinesh 
--
View this message in context: http://www.nabble.com/Bridge+ActiveMQ+with+another+JMS+Provider-t1711111.html#a4645779
Sent from the ServiceMix - User forum at Nabble.com.


Re: Bridge ActiveMQ with another JMS Provider

Posted by Guillaume Nodet <gn...@gmail.com>.
I have never used MantaRay, so I won't be able to help.
However, you can check the javadocs for Mantaray or
use a spring JNDI template to access the connection
factory.

Cheers,
Guillaume Nodet

On 6/1/06, dineshk <di...@prism.co.za> wrote:
>
>
> Hi
>
> Thanks for the response.
>
> I haven't tried configuring endpoints but am trying to configure a JMS
> Bridge. In my configuration below I have a JmsReceiverComponent which
> references a jmsFactory ActiveMQ related bean and have a
> JmsSenderComponent
> which references a mantarayJmsFactory bean. The configuration for this
> reference is not included. The connection factory class is
> org.mr.api.jms.MantaConnectionFactoryFactory. How do I configure this
> bean?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0">
>
>   <!-- the JBI container -->
>   <sm:container id="jbi"
>                 rootDir="./wdir"
>                 useMBeanServer="true"
>                                 createMBeanServer="true"
>                 installationDirPath="./install"
>                 deploymentDirPath="./deploy"
>                 dumpStats="true"
>                 statsInterval="10"
>                 flowName="seda"
>                 transactionManager="#transactionManager"
>                 >
>
>     <sm:activationSpecs>
>                 <sm:activationSpec componentName="myJmsReceiver"
> service="my:myJmsReceiver" destinationService="my:transformedSender">
>         <sm:component><bean
> class="org.apache.servicemix.components.jms.JmsReceiverComponent">
>           <property name="template">
>             <bean class="org.springframework.jms.core.JmsTemplate">
>               <property name="connectionFactory">
>                 <ref local="jmsFactory"/>
>               </property>
>               <property name="defaultDestinationName"
> value="TransferQueue"/>
>               <property name="pubSubDomain" value="true"/>
>             </bean>
>           </property>
>         </bean></sm:component>
>       </sm:activationSpec>
>
>       <!--sm:activationSpec componentName="transformer"
> service="my:transformer" destinationService="my:transformedSender">
>         <sm:component><bean
> class="org.apache.servicemix.components.xslt.XsltComponent">
>           <property name="xsltResource"
> value="classpath:org/apache/servicemix/components/xslt/transform.xsl"/>
>         </bean></sm:component>
>       </sm:activationSpec-->
>
>       <sm:activationSpec componentName="transformedSender"
> service="my:transformedSender">
>         <sm:component><bean
> class="org.apache.servicemix.components.jms.JmsSenderComponent">
>           <property name="template">
>             <bean class="org.springframework.jms.core.JmsTemplate">
>               <property name="connectionFactory">
>                 <ref local="mantarayJmsFactory"/>
>               </property>
>               <property name="defaultDestinationName"
> value="TransferQueue"/>
>               <property name="pubSubDomain" value="true"/>
>             </bean>
>           </property>
>         </bean></sm:component>
>       </sm:activationSpec>
>
>
>
>     </sm:activationSpecs>
>   </sm:container>
>
>   <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>   <bean id="transactionManager"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>
>   <!-- message broker -->
>   <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>      <property name="config"
> value="file:C:/Projects/VTM/JMS/etc/test/activemq/activemq.xml"/>
>   </bean>
>
>   <bean id="jmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL" value="tcp://localhost:61616"/>
>       </bean>
>     </property>
>   </bean>
>
> </beans>
>
>
> Regards,
> Dinesh
> --
> View this message in context:
> http://www.nabble.com/Bridge+ActiveMQ+with+another+JMS+Provider-t1711111.html#a4662727
> Sent from the ServiceMix - User forum at Nabble.com.
>
>

Re: Bridge ActiveMQ with another JMS Provider

Posted by dineshk <di...@prism.co.za>.
Hi

Thanks for the response.

I haven't tried configuring endpoints but am trying to configure a JMS
Bridge. In my configuration below I have a JmsReceiverComponent which
references a jmsFactory ActiveMQ related bean and have a JmsSenderComponent
which references a mantarayJmsFactory bean. The configuration for this
reference is not included. The connection factory class is
org.mr.api.jms.MantaConnectionFactoryFactory. How do I configure this bean?

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0">
 
  <!-- the JBI container -->
  <sm:container id="jbi" 
                rootDir="./wdir" 
                useMBeanServer="true"
		  		createMBeanServer="true" 
                installationDirPath="./install"
                deploymentDirPath="./deploy"
                dumpStats="true"
                statsInterval="10" 
                flowName="seda"
                transactionManager="#transactionManager"
                >

    <sm:activationSpecs>
		<sm:activationSpec componentName="myJmsReceiver"
service="my:myJmsReceiver" destinationService="my:transformedSender">
        <sm:component><bean
class="org.apache.servicemix.components.jms.JmsReceiverComponent">
          <property name="template">
            <bean class="org.springframework.jms.core.JmsTemplate">
              <property name="connectionFactory">
                <ref local="jmsFactory"/>
              </property>
              <property name="defaultDestinationName"
value="TransferQueue"/>
              <property name="pubSubDomain" value="true"/>
            </bean>
          </property>
        </bean></sm:component>
      </sm:activationSpec>

      <!--sm:activationSpec componentName="transformer"
service="my:transformer" destinationService="my:transformedSender">
        <sm:component><bean
class="org.apache.servicemix.components.xslt.XsltComponent">
          <property name="xsltResource"
value="classpath:org/apache/servicemix/components/xslt/transform.xsl"/>
        </bean></sm:component>
      </sm:activationSpec-->

      <sm:activationSpec componentName="transformedSender"
service="my:transformedSender">
        <sm:component><bean
class="org.apache.servicemix.components.jms.JmsSenderComponent">
          <property name="template">
            <bean class="org.springframework.jms.core.JmsTemplate">
              <property name="connectionFactory">
                <ref local="mantarayJmsFactory"/>
              </property>
              <property name="defaultDestinationName"
value="TransferQueue"/>
              <property name="pubSubDomain" value="true"/>
            </bean>
          </property>
        </bean></sm:component>
      </sm:activationSpec>

      
		
    </sm:activationSpecs>
  </sm:container>
  
  <bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
  <bean id="transactionManager"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
  
  <!-- message broker -->
  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
     <property name="config"
value="file:C:/Projects/VTM/JMS/etc/test/activemq/activemq.xml"/>
  </bean>

  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>
    
</beans>


Regards,
Dinesh
--
View this message in context: http://www.nabble.com/Bridge+ActiveMQ+with+another+JMS+Provider-t1711111.html#a4662727
Sent from the ServiceMix - User forum at Nabble.com.


Re: Bridge ActiveMQ with another JMS Provider

Posted by Guillaume Nodet <gn...@gmail.com>.
You just have to configure a consumer endpoint for ActiveMQ and a provider
endpoint
for Mantaray.   See http://servicemix.goopen.org/site/servicemix-jms.html

Cheers,
Guillaume Nodet

On 5/31/06, dineshk <di...@prism.co.za> wrote:
>
>
> Hi
>
> I have a Java SE application which runs an ActiveMQ broker via embedded
> ServiceMix and produces messages into a queue. The consumer application
> uses
> another JMS implementation such as Mantaray.
>
> How do I configure servicemix.xml to bridge the different JMS Providers?
>
> Regards,
> Dinesh
> --
> View this message in context:
> http://www.nabble.com/Bridge+ActiveMQ+with+another+JMS+Provider-t1711111.html#a4645779
> Sent from the ServiceMix - User forum at Nabble.com.
>
>