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.

Reply via email to