/*
* 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 {
if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
MessageUtil.transferInToOut(exchange, exchange);
channel.send(exchange);
}
}
public void setContext(javax.jbi.component.ComponentContext context) {
this.context = context;
}
}
bsnyder wrote:
>
> On 10/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> hi,
>> thanks for the suggestion
>> so you want me to build SA again
>> i am bit confused about the jms1 and jsm2
>> are they consumer or producer or both
>> also how does the xbean code of eip look like
>> also what will be the targets of the flow in this case from where to
>> where
>
> The jms1-su is a consumer of queueA and the jms2-su is a provider to
> queueB (simply for checking to see if the message is received.
>
> Can you post the body of the
> org.apache.YrkProject.MyBean.onMessageExchange() method?
>
> Bruce
> --
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> Castor - http://castor.org/
>
>
--
View this message in context:
http://www.nabble.com/Regarding-servicemix-bean-and-jms-consumer-tf4563322s12049.html#a13063331
Sent from the ServiceMix - User mailing list archive at Nabble.com.