You can not use org.apache.activemq.ra.ActiveMQActivationSpec, which is
ActiveMQ specific.
You need a resource adapter for your JMS broker.
If none is provided, you could take a look at
 https://genericjmsra.dev.java.net/

On 8/4/06, Timothy High <[EMAIL PROTECTED]> wrote:

Hi,

Did you ever get this working? If any one out there has a working
configuration, could you send an example of how to do it?

Also, I see that the configuration in the JMS-binding example is very
different from the servicemix-jms component, and very different from
using a pure Spring or a JCA approach. Can someone explain what each is
used for?

Thanks,
Tim.

-----Original Message-----
From: yangf [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 25, 2006 5:21 PM
To: [email protected]
Subject: How to use servicemix jca to listen msg in a topic in jbossMQ??


Does anyone have ideas on how to use jca in servicemix to listen
messages in
a topic in jbossMQ and poll the messages and forward them to weblogic
topic??

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


<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
xmlns:foo="http://servicemix.org/demo/pipeline/";>


<!--  the JBI container and its components
  -->
<sm:container id="jbi" embedded="true">

   <sm:activationSpecs>
    <!-- lets subscribe and republish on a different JMS destination -
i.e.
make a JMS bridge -->
                        <sm:activationSpec componentName="inputReceiver"
                                service="foo:inputReceiver"
destinationService="foo:jmsSender">
                                <sm:component>
                                        <bean
xmlns="http://xbean.org/schemas/spring/1.0";

class="org.apache.servicemix.components.jms.JmsInUsingJCABinding">
                                                <property
name="jcaContainer" ref="jencks" />
                                                <property
name="activationSpec">
                                                        <bean

class="org.apache.activemq.ra.ActiveMQActivationSpec">

<property name="destination"

value="topic/C2send" />

<property name="destinationType"

value="javax.jms.Topic" />
                                                        </bean>
                                                </property>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>




   <sm:activationSpec componentName="myJmsSender"
service="foo:jmsSender">
     <sm:component>
       <bean
class="org.apache.servicemix.components.jms.JmsSenderComponent">
         <property name="template">
           <bean class="org.springframework.jms.core.JmsTemplate">
<!--
<property name="connectionFactory">
                   <ref bean="jbossConnectionFactory" />
                </property>
                <property name="defaultDestination" >

                   <ref bean="jbossSourceDestination" />

                </property>
-->

             <property name="connectionFactory">
               <ref bean="weblogicConnectionFactory" />
             </property>
             <property name="defaultDestination">
                <ref bean="weblogicTargetDestination" />
             </property>

             <property name="pubSubDomain" value="false" />
          </bean>
        </property>
      </bean>
    </sm:component>
   </sm:activationSpec>




  </sm:activationSpecs>
</sm:container>



<bean id="jbossJndiTemplate"
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">
           jnp://DCGS-AP:1099
        </prop>
        <prop key="java.naming.factory.url.pkgs">
           org.jboss.naming:org.jnp.interfaces
        </prop>
      </props>
   </property>
</bean>

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

<bean id="jbossSourceDestination"
   class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiTemplate">
      <ref bean="jbossJndiTemplate"/>
   </property>
   <property name="jndiName">
      <value>topic/junk</value>
   </property>
</bean>

<bean id="weblogicJndiTemplate"
class="org.springframework.jndi.JndiTemplate">
   <property name="environment">
      <props>
        <prop key="java.naming.factory.initial">
           weblogic.jndi.WLInitialContextFactory
        </prop>
        <prop key="java.naming.provider.url">
           t3://enic01.ed.ray.com:7001
        </prop>

      </props>
   </property>
</bean>

<bean id="weblogicConnectionFactory"
    class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiTemplate">
      <ref bean="weblogicJndiTemplate"/>
   </property>
   <property name="jndiName">
      <value>mil/dcgs/jms/mdf/catalogConnectionFactory</value>
   </property>
</bean>

<bean id="weblogicTargetDestination"
   class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiTemplate">
      <ref bean="weblogicJndiTemplate"/>
   </property>
   <property name="jndiName">
      <value>topic/TargetSelection</value>
   </property>
</bean>

<!-- the JCA container -->
        <bean id="jencks" class="org.jencks.JCAContainer"
                singleton="true">

                <!-- lets use the default configuration of work manager
and transaction
manager-->
                <property name="bootstrapContext">
                        <bean

class="org.jencks.factory.BootstrapContextFactoryBean">
                                <property name="threadPoolSize"
value="25" />
                        </bean>
                </property>

                <!-- the JCA Resource Adapter -->
                <property name="resourceAdapter">
                        <bean id="activeMQResourceAdapter"

class="org.apache.activemq.ra.ActiveMQResourceAdapter" singleton="true">
                                <property name="serverUrl"
                                        value="tcp://DCGS-AP:1099" />
                        </bean>
                </property>
        </bean>

        <!-- message broker -->
        <bean id="broker"
class="org.apache.activemq.xbean.BrokerFactoryBean">
                <property name="config" value="classpath:activemq.xml"
/>
        </bean>

        <bean id="transactionContextManager"

class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
        <bean id="transactionManager"

class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />


</beans>
========

when I ran it, it did not do anything and no errors neither

any idea??? thanks a lot


-yangf
--
View this message in context:
http://www.nabble.com/How-to-use-servicemix-jca-to-listen-msg-in-a-topic
-in-jbossMQ---tf2000371.html#a5492533
Sent from the ServiceMix - User forum at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to