Also I think I am making here external endpoint.
How do I make my endpoint internal in this configuration?
Regards,
Raj




[EMAIL PROTECTED] 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.

Reply via email to