You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Raj@nih" <yr...@gmail.com> on 2007/10/09 22:30:10 UTC

How to stop my debugger at servicemix bean

Hi,
  I have deployed an SA having servicemix-bean SU and servicemix
jms-consumer-SU
I have jms test client program to send echo INOUT message to the bean and
get reply back.
I am able to get echo of getting what I am sending.I am ablt to step the
code using the client program but it doesn't stop at the printout of
onMessage() function in the bean.What is wrong with my configuration.I am
using eclipse remote debugging options which listens at port 5005.
Regards,
raj

My all programs are 
package nih.nci.gov.caXchange;
import javax.jbi.messaging.InOut;
import org.apache.servicemix.client.DefaultServiceMixClient; 
import org.apache.servicemix.jbi.jaxp.StringSource;
import javax.xml.namespace.QName; 
import javax.jms.*;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;


public class TestJmsClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws JMSException{
		 System.out.println("Connecting to JMS server.");
		  // ActiveMQ JMS Provider code
        ActiveMQConnectionFactory factory =                         
            new ActiveMQConnectionFactory("tcp://localhost:61616"); 
        Destination inQueue = new ActiveMQQueue("queueA");
        Destination outQueue = new
ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectoutput");
        Connection connection = factory.createConnection();         
        Session session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
     // Create the message 66 and consumer
        MessageProducer producer = session.createProducer(inQueue);
        MessageConsumer consumer = session.createConsumer(outQueue);
        System.out.println("Producer got this:  "+producer);
        System.out.println("Consumer got this:   "+consumer);
        connection.start();  
        System.out.println("Sending request.");                     
        //producer.send(session.createTextMessage("<message>Hello,
world!</message>"));
        TextMessage tMsg = session.createTextMessage("<message>Hello,
world!</message>");
        System.out.println(tMsg);
        tMsg.setJMSReplyTo(outQueue);
        producer.send(tMsg);

        TextMessage m = (TextMessage) consumer.receive(5000);
        try {
        	System.out.println("My Response is: " +
String.valueOf(m.getText()));
        } catch (Exception ex){
        	ex.printStackTrace();
        }
        connection.close();
        System.out.println("Done.");
        
        
        
		
	}
	
	 

}


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.servicemix.yrkproject;

import org.apache.servicemix.MessageExchangeListener;
import org.apache.servicemix.jbi.util.MessageUtil;

import javax.annotation.Resource;
import javax.jbi.messaging.DeliveryChannel;
import javax.jbi.messaging.ExchangeStatus;
import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.MessagingException;

//import javax.jbi.component.*;

public class MyBean implements MessageExchangeListener {
	//private ComponentContext context; 

    @Resource
    private DeliveryChannel channel;
    public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
    	System.out.println("This is from Bean EXCHANGE: " + exchange); 
    	if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
            MessageUtil.transferInToOut(exchange, exchange);
            channel.send(exchange);
        }
    	
    	
}
    
}




<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
       xmlns:y="http://gov.nih.nci.caxchange">

  <bean:endpoint service="y:testbeanservice" endpoint="testbean"
bean="#myBean"/>

  <bean id="myBean" class="org.apache.servicemix.yrkproject.MyBean"/>
</beans>



<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:y="http://gov.nih.nci.caxchange"
       xmlns:amq="http://activemq.org/config/1.0">

    
    <jms:endpoint service="y:testbeanservice"
                  endpoint="testbean"
                  role="consumer" 
                  destinationStyle="queue"
                  jmsProviderDestinationName="queueA"
                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                  defaultOperation="test:Echo"
                  connectionFactory="#connectionFactory" />


    <amq:connectionFactory id="connectionFactory"
brokerURL="tcp://localhost:61616" />   

    

</beans>






-- 
View this message in context: http://www.nabble.com/How-to-stop-my-debugger-at-servicemix-bean-tf4596726s12049.html#a13124170
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to stop my debugger at servicemix bean

Posted by Gert Vanthienen <ge...@skynet.be>.
Raj,


If you are stepping through the code of your client program, you are 
probably using the normal Eclipse debugger.

For debugging a SU inside SMX, you need to start a remote debugger 
session as explained in 
http://incubator.apache.org/servicemix/remote-debugging-servicemix-in-eclipse.html. 
  Also, make sure that you add a breakpoint somewhere in your 
servicemix-bean SU in order to step in...


Gert

Raj@nih wrote:
> Also I think I am making here external endpoint.
> How do I make my endpoint internal in this configuration?
> Regards,
> Raj
> 
> 
> 
> 
> Raj@nih wrote:
>> Hi,
>>   I have deployed an SA having servicemix-bean SU and servicemix
>> jms-consumer-SU
>> I have jms test client program to send echo INOUT message to the bean and
>> get reply back.
>> I am able to get echo of getting what I am sending.I am ablt to step the
>> code using the client program but it doesn't stop at the printout of
>> onMessage() function in the bean.What is wrong with my configuration.I am
>> using eclipse remote debugging options which listens at port 5005.
>> Regards,
>> raj
>>
>> My all programs are 
>> package nih.nci.gov.caXchange;
>> import javax.jbi.messaging.InOut;
>> import org.apache.servicemix.client.DefaultServiceMixClient; 
>> import org.apache.servicemix.jbi.jaxp.StringSource;
>> import javax.xml.namespace.QName; 
>> import javax.jms.*;
>>
>> import org.apache.activemq.ActiveMQConnectionFactory;
>> import org.apache.activemq.command.ActiveMQQueue;
>>
>>
>> public class TestJmsClient {
>>
>> 	/**
>> 	 * @param args
>> 	 */
>> 	public static void main(String[] args) throws JMSException{
>> 		 System.out.println("Connecting to JMS server.");
>> 		  // ActiveMQ JMS Provider code
>>         ActiveMQConnectionFactory factory =                         
>>             new ActiveMQConnectionFactory("tcp://localhost:61616"); 
>>         Destination inQueue = new ActiveMQQueue("queueA");
>>         Destination outQueue = new
>> ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectoutput");
>>         Connection connection = factory.createConnection();         
>>         Session session = connection.createSession(false,
>> Session.CLIENT_ACKNOWLEDGE);
>>      // Create the message 66 and consumer
>>         MessageProducer producer = session.createProducer(inQueue);
>>         MessageConsumer consumer = session.createConsumer(outQueue);
>>         System.out.println("Producer got this:  "+producer);
>>         System.out.println("Consumer got this:   "+consumer);
>>         connection.start();  
>>         System.out.println("Sending request.");                     
>>         //producer.send(session.createTextMessage("<message>Hello,
>> world!</message>"));
>>         TextMessage tMsg = session.createTextMessage("<message>Hello,
>> world!</message>");
>>         System.out.println(tMsg);
>>         tMsg.setJMSReplyTo(outQueue);
>>         producer.send(tMsg);
>>
>>         TextMessage m = (TextMessage) consumer.receive(5000);
>>         try {
>>         	System.out.println("My Response is: " +
>> String.valueOf(m.getText()));
>>         } catch (Exception ex){
>>         	ex.printStackTrace();
>>         }
>>         connection.close();
>>         System.out.println("Done.");
>>         
>>         
>>         
>> 		
>> 	}
>> 	
>> 	 
>>
>> }
>>
>>
>> /*
>>  * Licensed to the Apache Software Foundation (ASF) under one or more
>>  * contributor license agreements.  See the NOTICE file distributed with
>>  * this work for additional information regarding copyright ownership.
>>  * The ASF licenses this file to You under the Apache License, Version 2.0
>>  * (the "License"); you may not use this file except in compliance with
>>  * the License.  You may obtain a copy of the License at
>>  *
>>  *      http://www.apache.org/licenses/LICENSE-2.0
>>  *
>>  * Unless required by applicable law or agreed to in writing, software
>>  * distributed under the License is distributed on an "AS IS" BASIS,
>>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>>  * See the License for the specific language governing permissions and
>>  * limitations under the License.
>>  */
>> package org.apache.servicemix.yrkproject;
>>
>> import org.apache.servicemix.MessageExchangeListener;
>> import org.apache.servicemix.jbi.util.MessageUtil;
>>
>> import javax.annotation.Resource;
>> import javax.jbi.messaging.DeliveryChannel;
>> import javax.jbi.messaging.ExchangeStatus;
>> import javax.jbi.messaging.MessageExchange;
>> import javax.jbi.messaging.MessagingException;
>>
>> //import javax.jbi.component.*;
>>
>> public class MyBean implements MessageExchangeListener {
>> 	//private ComponentContext context; 
>>
>>     @Resource
>>     private DeliveryChannel channel;
>>     public void onMessageExchange(MessageExchange exchange) throws
>> MessagingException {
>>     	System.out.println("This is from Bean EXCHANGE: " + exchange); 
>>     	if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
>>             MessageUtil.transferInToOut(exchange, exchange);
>>             channel.send(exchange);
>>         }
>>     	
>>     	
>> }
>>     
>> }
>>
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>>
>>     Licensed to the Apache Software Foundation (ASF) under one or more
>>     contributor license agreements.  See the NOTICE file distributed with
>>     this work for additional information regarding copyright ownership.
>>     The ASF licenses this file to You under the Apache License, Version
>> 2.0
>>     (the "License"); you may not use this file except in compliance with
>>     the License.  You may obtain a copy of the License at
>>
>>        http://www.apache.org/licenses/LICENSE-2.0
>>
>>     Unless required by applicable law or agreed to in writing, software
>>     distributed under the License is distributed on an "AS IS" BASIS,
>>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>>     See the License for the specific language governing permissions and
>>     limitations under the License.
>>
>> -->
>> <beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
>>        xmlns:y="http://gov.nih.nci.caxchange">
>>
>>   <bean:endpoint service="y:testbeanservice" endpoint="testbean"
>> bean="#myBean"/>
>>
>>   <bean id="myBean" class="org.apache.servicemix.yrkproject.MyBean"/>
>> </beans>
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>>
>>     Licensed to the Apache Software Foundation (ASF) under one or more
>>     contributor license agreements.  See the NOTICE file distributed with
>>     this work for additional information regarding copyright ownership.
>>     The ASF licenses this file to You under the Apache License, Version
>> 2.0
>>     (the "License"); you may not use this file except in compliance with
>>     the License.  You may obtain a copy of the License at
>>
>>        http://www.apache.org/licenses/LICENSE-2.0
>>
>>     Unless required by applicable law or agreed to in writing, software
>>     distributed under the License is distributed on an "AS IS" BASIS,
>>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>>     See the License for the specific language governing permissions and
>>     limitations under the License.
>>
>> -->
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>        xmlns:y="http://gov.nih.nci.caxchange"
>>        xmlns:amq="http://activemq.org/config/1.0">
>>
>>     
>>     <jms:endpoint service="y:testbeanservice"
>>                   endpoint="testbean"
>>                   role="consumer" 
>>                   destinationStyle="queue"
>>                   jmsProviderDestinationName="queueA"
>>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>                   defaultOperation="test:Echo"
>>                   connectionFactory="#connectionFactory" />
>>
>>
>>     <amq:connectionFactory id="connectionFactory"
>> brokerURL="tcp://localhost:61616" />   
>>
>>     
>>
>> </beans>
>>
>>
>>
>>
>>
>>
>>
> 

Re: How to stop my debugger at servicemix bean

Posted by "Raj@nih" <yr...@gmail.com>.
Hi,
I am using remote debugger as explained in the link and have breakpoint on
it too.
Do i need to do step into the onMessage() method?
Regards,
Raj

Gert Vanthienen wrote:
> 
> Raj,
> 
> 
> If you are stepping through the code of your client program, you are 
> probably using the normal Eclipse debugger.
> 
> For debugging a SU inside SMX, you need to start a remote debugger 
> session as explained in 
> http://incubator.apache.org/servicemix/remote-debugging-servicemix-in-eclipse.html. 
>   Also, make sure that you add a breakpoint somewhere in your 
> servicemix-bean SU in order to step in...
> 
> 
> Gert
> 
> Raj@nih wrote:
>> Also I think I am making here external endpoint.
>> How do I make my endpoint internal in this configuration?
>> Regards,
>> Raj
>> 
>> 
>> 
>> 
>> Raj@nih wrote:
>>> Hi,
>>>   I have deployed an SA having servicemix-bean SU and servicemix
>>> jms-consumer-SU
>>> I have jms test client program to send echo INOUT message to the bean
>>> and
>>> get reply back.
>>> I am able to get echo of getting what I am sending.I am ablt to step the
>>> code using the client program but it doesn't stop at the printout of
>>> onMessage() function in the bean.What is wrong with my configuration.I
>>> am
>>> using eclipse remote debugging options which listens at port 5005.
>>> Regards,
>>> raj
>>>
>>> My all programs are 
>>> package nih.nci.gov.caXchange;
>>> import javax.jbi.messaging.InOut;
>>> import org.apache.servicemix.client.DefaultServiceMixClient; 
>>> import org.apache.servicemix.jbi.jaxp.StringSource;
>>> import javax.xml.namespace.QName; 
>>> import javax.jms.*;
>>>
>>> import org.apache.activemq.ActiveMQConnectionFactory;
>>> import org.apache.activemq.command.ActiveMQQueue;
>>>
>>>
>>> public class TestJmsClient {
>>>
>>> 	/**
>>> 	 * @param args
>>> 	 */
>>> 	public static void main(String[] args) throws JMSException{
>>> 		 System.out.println("Connecting to JMS server.");
>>> 		  // ActiveMQ JMS Provider code
>>>         ActiveMQConnectionFactory factory =                         
>>>             new ActiveMQConnectionFactory("tcp://localhost:61616"); 
>>>         Destination inQueue = new ActiveMQQueue("queueA");
>>>         Destination outQueue = new
>>> ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectoutput");
>>>         Connection connection = factory.createConnection();         
>>>         Session session = connection.createSession(false,
>>> Session.CLIENT_ACKNOWLEDGE);
>>>      // Create the message 66 and consumer
>>>         MessageProducer producer = session.createProducer(inQueue);
>>>         MessageConsumer consumer = session.createConsumer(outQueue);
>>>         System.out.println("Producer got this:  "+producer);
>>>         System.out.println("Consumer got this:   "+consumer);
>>>         connection.start();  
>>>         System.out.println("Sending request.");                     
>>>         //producer.send(session.createTextMessage("<message>Hello,
>>> world!</message>"));
>>>         TextMessage tMsg = session.createTextMessage("<message>Hello,
>>> world!</message>");
>>>         System.out.println(tMsg);
>>>         tMsg.setJMSReplyTo(outQueue);
>>>         producer.send(tMsg);
>>>
>>>         TextMessage m = (TextMessage) consumer.receive(5000);
>>>         try {
>>>         	System.out.println("My Response is: " +
>>> String.valueOf(m.getText()));
>>>         } catch (Exception ex){
>>>         	ex.printStackTrace();
>>>         }
>>>         connection.close();
>>>         System.out.println("Done.");
>>>         
>>>         
>>>         
>>> 		
>>> 	}
>>> 	
>>> 	 
>>>
>>> }
>>>
>>>
>>> /*
>>>  * Licensed to the Apache Software Foundation (ASF) under one or more
>>>  * contributor license agreements.  See the NOTICE file distributed with
>>>  * this work for additional information regarding copyright ownership.
>>>  * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>>  * (the "License"); you may not use this file except in compliance with
>>>  * the License.  You may obtain a copy of the License at
>>>  *
>>>  *      http://www.apache.org/licenses/LICENSE-2.0
>>>  *
>>>  * Unless required by applicable law or agreed to in writing, software
>>>  * distributed under the License is distributed on an "AS IS" BASIS,
>>>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>  * See the License for the specific language governing permissions and
>>>  * limitations under the License.
>>>  */
>>> package org.apache.servicemix.yrkproject;
>>>
>>> import org.apache.servicemix.MessageExchangeListener;
>>> import org.apache.servicemix.jbi.util.MessageUtil;
>>>
>>> import javax.annotation.Resource;
>>> import javax.jbi.messaging.DeliveryChannel;
>>> import javax.jbi.messaging.ExchangeStatus;
>>> import javax.jbi.messaging.MessageExchange;
>>> import javax.jbi.messaging.MessagingException;
>>>
>>> //import javax.jbi.component.*;
>>>
>>> public class MyBean implements MessageExchangeListener {
>>> 	//private ComponentContext context; 
>>>
>>>     @Resource
>>>     private DeliveryChannel channel;
>>>     public void onMessageExchange(MessageExchange exchange) throws
>>> MessagingException {
>>>     	System.out.println("This is from Bean EXCHANGE: " + exchange); 
>>>     	if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
>>>             MessageUtil.transferInToOut(exchange, exchange);
>>>             channel.send(exchange);
>>>         }
>>>     	
>>>     	
>>> }
>>>     
>>> }
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!--
>>>
>>>     Licensed to the Apache Software Foundation (ASF) under one or more
>>>     contributor license agreements.  See the NOTICE file distributed
>>> with
>>>     this work for additional information regarding copyright ownership.
>>>     The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>>     (the "License"); you may not use this file except in compliance with
>>>     the License.  You may obtain a copy of the License at
>>>
>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>
>>>     Unless required by applicable law or agreed to in writing, software
>>>     distributed under the License is distributed on an "AS IS" BASIS,
>>>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>     See the License for the specific language governing permissions and
>>>     limitations under the License.
>>>
>>> -->
>>> <beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
>>>        xmlns:y="http://gov.nih.nci.caxchange">
>>>
>>>   <bean:endpoint service="y:testbeanservice" endpoint="testbean"
>>> bean="#myBean"/>
>>>
>>>   <bean id="myBean" class="org.apache.servicemix.yrkproject.MyBean"/>
>>> </beans>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!--
>>>
>>>     Licensed to the Apache Software Foundation (ASF) under one or more
>>>     contributor license agreements.  See the NOTICE file distributed
>>> with
>>>     this work for additional information regarding copyright ownership.
>>>     The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>>     (the "License"); you may not use this file except in compliance with
>>>     the License.  You may obtain a copy of the License at
>>>
>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>
>>>     Unless required by applicable law or agreed to in writing, software
>>>     distributed under the License is distributed on an "AS IS" BASIS,
>>>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>     See the License for the specific language governing permissions and
>>>     limitations under the License.
>>>
>>> -->
>>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>>        xmlns:y="http://gov.nih.nci.caxchange"
>>>        xmlns:amq="http://activemq.org/config/1.0">
>>>
>>>     
>>>     <jms:endpoint service="y:testbeanservice"
>>>                   endpoint="testbean"
>>>                   role="consumer" 
>>>                   destinationStyle="queue"
>>>                   jmsProviderDestinationName="queueA"
>>>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>                   defaultOperation="test:Echo"
>>>                   connectionFactory="#connectionFactory" />
>>>
>>>
>>>     <amq:connectionFactory id="connectionFactory"
>>> brokerURL="tcp://localhost:61616" />   
>>>
>>>     
>>>
>>> </beans>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-stop-my-debugger-at-servicemix-bean-tf4596726s12049.html#a13136193
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to stop my debugger at servicemix bean

Posted by "Raj@nih" <yr...@gmail.com>.
Also I think I am making here external endpoint.
How do I make my endpoint internal in this configuration?
Regards,
Raj




Raj@nih wrote:
> 
> Hi,
>   I have deployed an SA having servicemix-bean SU and servicemix
> jms-consumer-SU
> I have jms test client program to send echo INOUT message to the bean and
> get reply back.
> I am able to get echo of getting what I am sending.I am ablt to step the
> code using the client program but it doesn't stop at the printout of
> onMessage() function in the bean.What is wrong with my configuration.I am
> using eclipse remote debugging options which listens at port 5005.
> Regards,
> raj
> 
> My all programs are 
> package nih.nci.gov.caXchange;
> import javax.jbi.messaging.InOut;
> import org.apache.servicemix.client.DefaultServiceMixClient; 
> import org.apache.servicemix.jbi.jaxp.StringSource;
> import javax.xml.namespace.QName; 
> import javax.jms.*;
> 
> import org.apache.activemq.ActiveMQConnectionFactory;
> import org.apache.activemq.command.ActiveMQQueue;
> 
> 
> public class TestJmsClient {
> 
> 	/**
> 	 * @param args
> 	 */
> 	public static void main(String[] args) throws JMSException{
> 		 System.out.println("Connecting to JMS server.");
> 		  // ActiveMQ JMS Provider code
>         ActiveMQConnectionFactory factory =                         
>             new ActiveMQConnectionFactory("tcp://localhost:61616"); 
>         Destination inQueue = new ActiveMQQueue("queueA");
>         Destination outQueue = new
> ActiveMQQueue("nih.nci.gov.caXchange.org.servicemix.yrkprojectoutput");
>         Connection connection = factory.createConnection();         
>         Session session = connection.createSession(false,
> Session.CLIENT_ACKNOWLEDGE);
>      // Create the message 66 and consumer
>         MessageProducer producer = session.createProducer(inQueue);
>         MessageConsumer consumer = session.createConsumer(outQueue);
>         System.out.println("Producer got this:  "+producer);
>         System.out.println("Consumer got this:   "+consumer);
>         connection.start();  
>         System.out.println("Sending request.");                     
>         //producer.send(session.createTextMessage("<message>Hello,
> world!</message>"));
>         TextMessage tMsg = session.createTextMessage("<message>Hello,
> world!</message>");
>         System.out.println(tMsg);
>         tMsg.setJMSReplyTo(outQueue);
>         producer.send(tMsg);
> 
>         TextMessage m = (TextMessage) consumer.receive(5000);
>         try {
>         	System.out.println("My Response is: " +
> String.valueOf(m.getText()));
>         } catch (Exception ex){
>         	ex.printStackTrace();
>         }
>         connection.close();
>         System.out.println("Done.");
>         
>         
>         
> 		
> 	}
> 	
> 	 
> 
> }
> 
> 
> /*
>  * Licensed to the Apache Software Foundation (ASF) under one or more
>  * contributor license agreements.  See the NOTICE file distributed with
>  * this work for additional information regarding copyright ownership.
>  * The ASF licenses this file to You under the Apache License, Version 2.0
>  * (the "License"); you may not use this file except in compliance with
>  * the License.  You may obtain a copy of the License at
>  *
>  *      http://www.apache.org/licenses/LICENSE-2.0
>  *
>  * Unless required by applicable law or agreed to in writing, software
>  * distributed under the License is distributed on an "AS IS" BASIS,
>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
>  * See the License for the specific language governing permissions and
>  * limitations under the License.
>  */
> package org.apache.servicemix.yrkproject;
> 
> import org.apache.servicemix.MessageExchangeListener;
> import org.apache.servicemix.jbi.util.MessageUtil;
> 
> import javax.annotation.Resource;
> import javax.jbi.messaging.DeliveryChannel;
> import javax.jbi.messaging.ExchangeStatus;
> import javax.jbi.messaging.MessageExchange;
> import javax.jbi.messaging.MessagingException;
> 
> //import javax.jbi.component.*;
> 
> public class MyBean implements MessageExchangeListener {
> 	//private ComponentContext context; 
> 
>     @Resource
>     private DeliveryChannel channel;
>     public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
>     	System.out.println("This is from Bean EXCHANGE: " + exchange); 
>     	if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
>             MessageUtil.transferInToOut(exchange, exchange);
>             channel.send(exchange);
>         }
>     	
>     	
> }
>     
> }
> 
> 
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
> 
>     Licensed to the Apache Software Foundation (ASF) under one or more
>     contributor license agreements.  See the NOTICE file distributed with
>     this work for additional information regarding copyright ownership.
>     The ASF licenses this file to You under the Apache License, Version
> 2.0
>     (the "License"); you may not use this file except in compliance with
>     the License.  You may obtain a copy of the License at
> 
>        http://www.apache.org/licenses/LICENSE-2.0
> 
>     Unless required by applicable law or agreed to in writing, software
>     distributed under the License is distributed on an "AS IS" BASIS,
>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
>     See the License for the specific language governing permissions and
>     limitations under the License.
> 
> -->
> <beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
>        xmlns:y="http://gov.nih.nci.caxchange">
> 
>   <bean:endpoint service="y:testbeanservice" endpoint="testbean"
> bean="#myBean"/>
> 
>   <bean id="myBean" class="org.apache.servicemix.yrkproject.MyBean"/>
> </beans>
> 
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
> 
>     Licensed to the Apache Software Foundation (ASF) under one or more
>     contributor license agreements.  See the NOTICE file distributed with
>     this work for additional information regarding copyright ownership.
>     The ASF licenses this file to You under the Apache License, Version
> 2.0
>     (the "License"); you may not use this file except in compliance with
>     the License.  You may obtain a copy of the License at
> 
>        http://www.apache.org/licenses/LICENSE-2.0
> 
>     Unless required by applicable law or agreed to in writing, software
>     distributed under the License is distributed on an "AS IS" BASIS,
>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
>     See the License for the specific language governing permissions and
>     limitations under the License.
> 
> -->
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:y="http://gov.nih.nci.caxchange"
>        xmlns:amq="http://activemq.org/config/1.0">
> 
>     
>     <jms:endpoint service="y:testbeanservice"
>                   endpoint="testbean"
>                   role="consumer" 
>                   destinationStyle="queue"
>                   jmsProviderDestinationName="queueA"
>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                   defaultOperation="test:Echo"
>                   connectionFactory="#connectionFactory" />
> 
> 
>     <amq:connectionFactory id="connectionFactory"
> brokerURL="tcp://localhost:61616" />   
> 
>     
> 
> </beans>
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-stop-my-debugger-at-servicemix-bean-tf4596726s12049.html#a13124233
Sent from the ServiceMix - User mailing list archive at Nabble.com.