How do I embed servicemix in it?
Raj

gnodet wrote:
> 
> Everything seems to be fine.  What do you men by "you can't step to
> that particular program" ?  You want to debug the bean ?  You should
> be able to do that using either remote debugging, or writing a unit
> test and embedding servicemix in it.
> 
> On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>> I think I am getting it now but still I not not step to that particular
>> step
>> in bean
>> Please look at my new output too
>>
>>
>> My bean xbean
>> <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>
>>
>> My jms xbean
>> 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>
>>
>>
>>
>> My new output is:
>>
>> Starting Apache ServiceMix ESB: 3.1.1-incubating
>>
>> Loading Apache ServiceMix from servicemix.xml on the CLASSPATH
>> INFO  - ConnectorServerFactoryBean     - JMX connector available at:
>> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
>> INFO  - JBIContainer                   - ServiceMix 3.1.1-incubating JBI
>> Container (ServiceMix) is starting
>> INFO  - JBIContainer                   - For help or more informations
>> please see: http://incubator.apache.org/servicemix/
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> #SubscriptionManager#
>> INFO  - DeploymentService              - Restoring service assemblies
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: servicemix-bean to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-bean
>> INFO  - ComponentMBeanImpl             - Setting running state for
>> Component: servicemix-jms to Started
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> servicemix-jms
>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>> yrkproject-jmsbean-sa
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> yrkproject-bean-su
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> yrkproject-jms-consumer-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> yrkproject-bean-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> yrkproject-jms-consumer-su
>> INFO  - JBIContainer                   - ServiceMix JBI Container
>> (ServiceMix) started
>> INFO  - JDBCAdapterFactory             - Database driver recognized:
>> [apache_derby_embedded_jdbc_driver]
>> INFO  - LogTask                        - log4j system reconfigured
>> INFO  - AutoDeploymentService          - Location
>> yrkproject-jmsbean-sa-1.0-SNAPSHOT.jar no longer exists - removing ...
>> INFO  - AutoDeploymentService          - Attempting to remove archive at:
>> yrkproject-jmsbean-sa-1.0-SNAPSHOT.jar
>> INFO  - AutoDeploymentService          - Undeploying service assembly
>> yrkproject-jmsbean-sa
>> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
>> yrkproject-jmsbean-sa
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> yrkproject-bean-su
>> INFO  - ServiceUnitLifeCycle           - Stopping service unit:
>> yrkproject-jms-consumer-su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> yrkproject-bean-su
>> INFO  - ServiceUnitLifeCycle           - Shutting down service unit:
>> yrkproject-jms-consumer-su
>> INFO  - ServiceAssemblyLifeCycle       - Shutting down service assembly:
>> yrkproject-jmsbean-sa
>> INFO  - DeploymentService              - UnDeployed ServiceUnit
>> yrkproject-bean-su from Component: servicemix-bean
>> INFO  - DeploymentService              - UnDeployed ServiceUnit
>> yrkproject-jms-consumer-su from Component: servicemix-jms
>> INFO  - AutoDeploymentService          - Directory: deploy: Archive
>> changed:
>> processing yrkproject-jmsbean-sa-1.0-SNAPSHOT.jar ...
>> INFO  - ServiceAssemblyLifeCycle       - Starting service assembly:
>> yrkproject-jmsbean-sa
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> yrkproject-bean-su
>> INFO  - ServiceUnitLifeCycle           - Initializing service unit:
>> yrkproject-jms-consumer-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> yrkproject-bean-su
>> INFO  - ServiceUnitLifeCycle           - Starting service unit:
>> yrkproject-jms-consumer-su
>> INFO  - AutoDeploymentService          - Directory: deploy: Finished
>> installation of archive:  yrkproject-jmsbean-sa-1.0-SNAPSHOT.jar
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:5
>>   status: Active
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:5
>>   status: Done
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>>   out: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:6
>>   status: Active
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:6
>>   status: Done
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>>   out: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:7
>>   status: Active
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:7
>>   status: Done
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>>   out: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:8
>>   status: Active
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>> This is from Bean EXCHANGE: InOut[
>>   id: ID:165.112.132.44-115855809bc-3:8
>>   status: Done
>>   role: provider
>>   service: {http://gov.nih.nci.caxchange}testbeanservice
>>   endpoint: testbean
>>   operation: Echo
>>   in: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>>   out: <?xml version="1.0" encoding="UTF-8"?><message>Hello,
>> world!</message>
>> ]
>>
>>
>>
>> It shows that its printing from servicemix-bean but why can't i step to
>> that
>> particular program SOP.
>> Is this the way servicemix is built?
>> Regards,
>> Raj
>>
>>
>>
>>
>>
>> gnodet wrote:
>> >
>> > You just forgot to send the most valuable part, which is the
>> > configuration of servicemix-jms and servicemix-bean...  Could you
>> > provide those ?
>> >
>> > On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi,
>> >> I am sending the message from my jms client to the bean for echo the
>> >> request
>> >> in Inout MEPs.
>> >> I am not able to print the message from bean.Please suggest what might
>> be
>> >> going wrong?
>> >> This is my bean
>> >>
>> >> /*
>> >>  * 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);
>> >>         }
>> >>
>> >>
>> >> }
>> >>     /*public void setContext(javax.jbi.component.ComponentContext
>> >> context) {
>> >>         this.context = context;
>> >> } */
>> >>
>> >> }
>> >>
>> >>
>> >> This is my test client:
>> >> 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.");
>> >>
>> >>
>> >>
>> >>
>> >>         }
>> >>
>> >>
>> >>
>> >> }
>> >>
>> >>
>> >> This is my output while running the client
>> >> Connecting to JMS server.
>> >> log4j:WARN No appenders could be found for logger
>> >> (org.apache.activemq.transport.WireFormatNegotiator).
>> >> log4j:WARN Please initialize the log4j system properly.
>> >> Producer got this:  ActiveMQMessageProducer {
>> >> value=ID:2115-khanaly-1-4565-1191942269154-1:0:1:1 }
>> >> Consumer got this:   ActiveMQMessageConsumer {
>> >> value=ID:2115-khanaly-1-4565-1191942269154-1:0:1:1, started=false }
>> >> Sending request.
>> >> ActiveMQTextMessage {commandId = 0, responseRequired = false,
>> messageId =
>> >> null, originalDestination = null, originalTransactionId = null,
>> >> producerId =
>> >> null, destination = null, transactionId = null, expiration = 0,
>> timestamp
>> >> =
>> >> 0, arrival = 0, correlationId = null, replyTo = null, persistent =
>> false,
>> >> type = null, priority = 0, groupID = null, groupSequence = 0,
>> >> targetConsumerId = null, compressed = false, userID = null, content =
>> >> null,
>> >> marshalledProperties = null, dataStructure = null, redeliveryCounter =
>> 0,
>> >> size = 0, properties = null, readOnlyProperties = false, readOnlyBody
>> =
>> >> false, droppable = false, text = <message>Hello, world!</message>}
>> >> My Response is: <?xml version='1.0' encoding='UTF-8'?><message>Hello,
>> >> world!</message>
>> >> Done.
>> >>
>> >>
>> >> I am wondering if I could step through the SOP line in MyBean.If can
>> why
>> >> am
>> >> not able to do and if can't why?Please reply me with  the reason.All
>> your
>> >> previous responses were very valueable to me and helping me lot.Thanks
>> >> all
>> >> for the prompt and to the point solutions.
>> >> Regards,
>> >> Raj
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Control-not-going-to-the-bean-while-debugging-tf4594787s12049.html#a13117507
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Blog: http://gnodet.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Control-not-going-to-the-bean-while-debugging-tf4594787s12049.html#a13118276
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Control-not-going-to-the-bean-while-debugging-tf4594787s12049.html#a13162959
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to