I posted the following message in forum.java.sun.com. I was told that I may
get good help from here.

-----
I tried to use ServiceMix to bridge JMS messaging between weblogic and
JBoss. I referenced some examples from serviceMix.com on how to configure
JMS bridge in servicemix. However it did not work. In order to make it work,
do I need to put jboss client jars and weblogic client jars in the
servicemix classpath? my secenario is that jmsReceiver in servicemix needs
to subscribe jms msg from the destination in Jboss and jmsSender publishs to
the destination in weblogic. How should I do use serviceMix? the example
being listed in ServiceMix.com all assume subscribe /publich from/to jms msg
from activeMQ destination. how about from /to different jms providers from
avtiveMQ? 

---

Since then I have tried including jboss client jars and wl jars in
classpath. I started servicemix. It looked OK without errors. However when I
publish jms meesage in teh destination in jboss (servicemix was supposed to
sub the msg from the jboss destination and pub it to wl), I got the
following errors

C:\incubating-servicemix-3.0-SNAPSHOT\examples\jms-bridge>servicemix
servicemix.xml
Apache ServiceMix ESB: 3.0-SNAPSHOT

Loading Apache ServiceMix from file: servicemix.xml
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=#SubscriptionManage
INFO  - ComponentMBeanImpl             - Initializing component:
#SubscriptionManager#
INFO  - DeploymentService              - Restoring service assemblies
INFO  - JBIContainer                   - ServiceMix JBI Container
(http://servicemix.org/) name: ServiceMix runni
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=myJmsReceiver] with
INFO  - ComponentMBeanImpl             - Initializing component:
myJmsReceiver
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=transformer] with s
INFO  - ComponentMBeanImpl             - Initializing component: transformer
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=transformedSender]
INFO  - ComponentMBeanImpl             - Initializing component:
transformedSender
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=myJmsSender] with s
INFO  - ComponentMBeanImpl             - Initializing component: myJmsSender
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
ERROR - ServerThread                   - socket timed out
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
        at java.io.FilterInputStream.read(FilterInputStream.java:66)
        at
org.jboss.serial.io.JBossObjectInputStream.read(JBossObjectInputStream.java:140)
        at
org.jboss.remoting.transport.socket.ServerThread.readVersion(ServerThread.java:464)
        at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:381)
        at
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:498)
        at
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:240)



Note: please ignor the transformer which I did not use it in the test. My
servicemix.xml is

<?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>
     <sm:activationSpec componentName="myJmsReceiver"
service="foo:myJmsReceiver"                                                     
destinationService="foo:jmsSender">
        <sm:component>
          <bean 
class="org.apache.servicemix.components.jms.JmsReceiverComponent">
            <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="pubSubDomain" value="true" /> 
              </bean>
           </property>
         </bean>
        </sm:component>
       </sm:activationSpec>


   <sm:activationSpec componentName="transformer" service="foo:transformer"     
                                        
destinationService="foo: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="foo: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="jmsFactory" /> 
             </property>
             <property name="defaultDestinationName"
value="demo.cheese.result" /> 
             <property name="pubSubDomain" value="true" /> 
          </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="weblogicConnectionFactory" /> 
             </property>
             <property name="defaultDestination">
                <ref bean="weblogicTargetDestination" /> 
             </property>
             <property name="pubSubDomain" value="true" /> 
          </bean>
        </property>
      </bean>
    </sm:component>
   </sm:activationSpec>

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

 <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
   <property name="connectionFactory">
     <bean class="org.apache.activemq.ActiveMQConnectionFactory">
       <property name="brokerURL"
value="vm://localhost?broker.persistent=false" /> 
     </bean>
   </property>
 </bean>

 <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://L71037263: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/testTopic</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/GMTIDetections</value>
   </property>
 </bean>



</beans>


Thank you very much if you have any idea on it!!!!!
-- 
View this message in context: 
http://www.nabble.com/bridge-jboss-and-weblogic-using-servicemix-tf1875188.html#a5126716
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to