hi, I am new to servicemix. I want to do the following: 

1. Component1 is httpbinding component that receives request from http
client. 
2. Component2 receives the message through JMS bus 
3. Component3 also receives JMS message 
4. Response is sent back to http client. 

Do I need to transform http message into jms before component 2 receives it?
please see servicemix.xml file below. for simplicity, say if there is a
component2 in http-binding example, how would it receive message from
httpReceiver? Or what changes should be made if in loan-broker example,
Lender Gateway has http binding? 

mqadeer  

servicemix.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0";
        xmlns:spring="http://xbean.org/schemas/spring/1.0";
        xmlns:sm="http://servicemix.org/config/1.0";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
../../conf/spring-beans.xsd
                            http://servicemix.org/config/1.0
../../conf/servicemix.xsd"
    xmlns:my="http://servicemix.org/demo/";>
    
  <!-- the JBI container -->
  <sm:container spring:id="jbi"
                useMBeanServer="true"
                createMBeanServer="true"
                dumpStats="true"
                statsInterval="10">
                
        <sm:activationSpecs>
                
                <!-- Create a http server binding on port 8912  and have it 
forward to -->      
                <sm:activationSpec componentName="httpReceiver"         
                                                   service="my:httpBinding"
                                                   endpoint="httpReceiver"
                                                   
destinationService="my:stockQuote">
                  <sm:component>
                    <bean xmlns="http://xbean.org/schemas/spring/1.0";
                          class="org.servicemix.components.http.HttpConnector">
                        <property name="host" value="localhost"/>
                        <property name="port" value="8912"/>
                    </bean>
                  </sm:component>
                </sm:activationSpec>
                
                <!--
                <sm:activationSpec componentName="inputSender"
                                service="my:inputSender">
                        <sm:component>
                                <bean 
xmlns="http://xbean.org/schemas/spring/1.0";
                                        
class="org.servicemix.components.jms.JmsSenderComponent">
                                        <property name="template">
                                        <bean
                                                
class="org.springframework.jms.core.JmsTemplate">
                                                <property 
name="connectionFactory">
                                                        <ref local="jmsFactory" 
/>
                                                </property>
                                                <property 
name="defaultDestinationName"
                                                        
value="demo.org.servicemix.source" />
                                                <property name="pubSubDomain"
                                                        value="true" />
                                        </bean>
                                        </property>
                                </bean>
                        </sm:component>
                </sm:activationSpec>

                <sm:activationSpec componentName="inputReceiver"
                                service="my:inputReceiver">
                                <sm:component>
                                        <bean 
xmlns="http://xbean.org/schemas/spring/1.0";
                                                
class="org.servicemix.components.jms.JmsInUsingJCABinding">
                                                <property name="jcaContainer" 
ref="jencks" />
                                                <property name="activationSpec">
                                                        <bean
                                                                
class="org.activemq.ra.ActiveMQActivationSpec">
                                                                <property 
name="destination"
                                                                        
value="demo.org.servicemix.source" />
                                                                <property 
name="destinationType"
                                                                        
value="javax.jms.Topic" />
                                                        </bean>
                                                </property>
                                        </bean>
                                </sm:component>
                </sm:activationSpec> -->

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

  <!-- 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.activemq.ra.ActiveMQResourceAdapter" singleton="true">
        <property name="serverUrl" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>

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

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

</beans>

-- 
View this message in context: 
http://www.nabble.com/http-to-jms-message-transformation-tf2008896.html#a5518883
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to