Package org.apache.servicemix.common

Examples of org.apache.servicemix.common.BaseLifeCycle


        }
    }

    protected void send(MessageExchange me) throws MessagingException {
        if (me.getRole() == MessageExchange.Role.CONSUMER && me.getStatus() == ExchangeStatus.ACTIVE) {
            BaseLifeCycle lf = (BaseLifeCycle) getServiceUnit().getComponent().getLifeCycle();
            lf.sendConsumerExchange(me, (Endpoint) this);
        } else {
            channel.send(me);
        }
    }
View Full Code Here


                   && endpoint.getConfiguration().getJndiProviderUrl() != null) {
            props.put(InitialContext.INITIAL_CONTEXT_FACTORY, endpoint.getConfiguration().getJndiInitialContextFactory());
            props.put(InitialContext.PROVIDER_URL, endpoint.getConfiguration().getJndiProviderUrl());
            return new InitialContext(props);
        } else {
            BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
            return lf.getContext().getNamingContext();
        }
    }
View Full Code Here

            pendingMessages.put(exchange.getExchangeId(), context);
            if (endpoint.isSynchronous()) {
                channel.sendSync(exchange);
                process(exchange);
            } else {
                BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
                lf.sendConsumerExchange(exchange, JcaConsumerProcessor.this.endpoint);
            }
        } catch (Throwable e) {
            LOG.error("Error while handling jms message", e);
        }
    }
View Full Code Here

                        Context context = createContext();
                        MessageExchange exchange = toNMS(message, context);
                        // TODO: copy protocol messages
                        //inMessage.setProperty(JbiConstants.PROTOCOL_HEADERS, getHeaders(message));
                        pendingMessages.put(exchange.getExchangeId(), context);
                        BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
                        lf.sendConsumerExchange(exchange, MultiplexingConsumerProcessor.this.endpoint);
                    } catch (Throwable e) {
                        log.error("Error while handling jms message", e);
                    }
                }
            });
View Full Code Here

    }
   
    protected void send(MessageExchange me) throws MessagingException {
        if (me.getRole() == MessageExchange.Role.CONSUMER &&
            me.getStatus() == ExchangeStatus.ACTIVE) {
            BaseLifeCycle lf = (BaseLifeCycle) getServiceUnit().getComponent().getLifeCycle();
            lf.sendConsumerExchange(me, (Endpoint) this);
        } else {
            channel.send(me);
        }
    }
View Full Code Here

                   endpoint.getConfiguration().getJndiProviderUrl() != null) {
            props.put(InitialContext.INITIAL_CONTEXT_FACTORY, endpoint.getConfiguration().getJndiInitialContextFactory());
            props.put(InitialContext.PROVIDER_URL, endpoint.getConfiguration().getJndiProviderUrl());
            return new InitialContext(props);
        } else {
            BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
            return lf.getContext().getNamingContext();
        }
    }
View Full Code Here

            pendingMessages.put(exchange.getExchangeId(), context);
            if (endpoint.isSynchronous()) {
                channel.sendSync(exchange);
                process(exchange);
            } else {
                BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
                lf.sendConsumerExchange(exchange, JcaConsumerProcessor.this.endpoint);
            }
        } catch (Throwable e) {
            log.error("Error while handling jms message", e);
        }
    }
View Full Code Here

                   && endpoint.getConfiguration().getJndiProviderUrl() != null) {
            props.put(InitialContext.INITIAL_CONTEXT_FACTORY, endpoint.getConfiguration().getJndiInitialContextFactory());
            props.put(InitialContext.PROVIDER_URL, endpoint.getConfiguration().getJndiProviderUrl());
            return new InitialContext(props);
        } else {
            BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
            return lf.getContext().getNamingContext();
        }
    }
View Full Code Here

    }
   
    protected void send(MessageExchange me) throws MessagingException {
        if (me.getRole() == MessageExchange.Role.CONSUMER &&
            me.getStatus() == ExchangeStatus.ACTIVE) {
            BaseLifeCycle lf = (BaseLifeCycle) getServiceUnit().getComponent().getLifeCycle();
            lf.sendConsumerExchange(me, (Endpoint) this);
        } else {
            channel.send(me);
        }
    }
View Full Code Here

  }

  protected void send(MessageExchange me) throws MessagingException {
    if (me.getRole() == MessageExchange.Role.CONSUMER
        && me.getStatus() == ExchangeStatus.ACTIVE) {
      BaseLifeCycle lf = (BaseLifeCycle) getServiceUnit().getComponent()
          .getLifeCycle();
      lf.sendConsumerExchange(me, (Endpoint) this);
    } else {
      channel.send(me);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.common.BaseLifeCycle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.