Package javax.jbi.component

Examples of javax.jbi.component.ComponentContext


    private List helpers = new ArrayList();

    public void activate() throws Exception {
        logger = this.serviceUnit.getComponent().getLogger();
        ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
        channel = ctx.getDeliveryChannel();
        activated = ctx.activateEndpoint(service, endpoint);
        start();
    }
View Full Code Here


    public void deactivate() throws Exception {
        stop();
        ServiceEndpoint ep = activated;
        activated = null;
        ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
        ctx.deactivateEndpoint(ep);
    }
View Full Code Here

                MessageExchangeFactory.class);
        if (mef == null) {
            DeliveryChannel dv = message.getExchange().get(
                    DeliveryChannel.class);
            if (dv == null) {
                ComponentContext cc = message.getExchange().get(
                        ComponentContext.class);
                if (cc == null) {
                    throw new NullPointerException(
                            "MessageExchangeFactory or DeliveryChannel or ComponentContext not found");
                }
                dv = cc.getDeliveryChannel();
            }
            mef = dv.createExchangeFactory();
        }
        MessageExchange me = mef.createExchange(mep);
        me.setOperation(operation.getName());
View Full Code Here

    /* (non-Javadoc)
     * @see org.servicemix.common.Endpoint#activate()
     */
    public void activate() throws Exception {
        logger = this.serviceUnit.getComponent().getLogger();
        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
        activated = ctx.activateEndpoint(service, endpoint);
        injectPojo(new EndpointComponentContext(this), getContainer());
        processor.start();
    }
View Full Code Here

     */
    public void deactivate() throws Exception {
        ServiceEndpoint ep = activated;
        activated = null;
        processor.stop();
        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
        ctx.deactivateEndpoint(ep);
        injectPojo(null, null);
    }
View Full Code Here

        }
    }
   
    protected JBIContainer getContainer() {
        try {
            ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
            Field field = ctx.getClass().getDeclaredField("container");
            field.setAccessible(true);
            return (JBIContainer) field.get(ctx);
        } catch (Exception e) {
            logger.debug("Unable to retrieve JBIContainer: " + e.getMessage());
            return null;
View Full Code Here

        jaxbContext = createJAXBContext(endpointInterface);
        ws = getWebServiceAnnotation(endpointInterface);
        if (ws != null) {
            interfaceName = new QName(ws.targetNamespace(), ws.name());
        }
        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
        activated = ctx.activateEndpoint(service, endpoint);
        channel = ctx.getDeliveryChannel();
    }
View Full Code Here

    @Override
    public void deactivate() throws Exception {
        ServiceEndpoint ep = activated;
        activated = null;
        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
        ctx.deactivateEndpoint(ep);
    }
View Full Code Here

                return;
            }

            MessageExchange exchange = message
                    .getContent(MessageExchange.class);
            ComponentContext context = message.getExchange().get(
                    ComponentContext.class);
            CxfBcConsumer.this.configureExchangeTarget(exchange);
            CxfBcConsumer.this.messages.put(exchange.getExchangeId(), message);
            CxfBcConsumer.this.isOneway = message.getExchange().get(
                    BindingOperationInfo.class).getOperationInfo().isOneWay();
            message.getExchange().setOneWay(CxfBcConsumer.this.isOneway);
           

            try {
                if (CxfBcConsumer.this.synchronous
                        && !CxfBcConsumer.this.isOneway) {
                    message.getInterceptorChain().pause();
                    context.getDeliveryChannel().sendSync(exchange, 10000);
                    process(exchange);
                } else {
                    context.getDeliveryChannel().send(exchange);
                   
                }
            } catch (Exception e) {
                throw new Fault(e);
            }
View Full Code Here

        }
        MessageExchangeFactory mef = message.get(MessageExchangeFactory.class);
        if (mef == null) {
            DeliveryChannel dv = message.get(DeliveryChannel.class);
            if (dv == null) {
                ComponentContext cc = message.get(ComponentContext.class);
                if (cc == null) {
                    throw new NullPointerException("MessageExchangeFactory or DeliveryChannel or ComponentContext not found");
                }
                dv = cc.getDeliveryChannel();
            }
            mef = dv.createExchangeFactory();
        }
        return mef.createExchange(mep);
    }
View Full Code Here

TOP

Related Classes of javax.jbi.component.ComponentContext

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.