Package javax.jbi.component

Examples of javax.jbi.component.ComponentContext


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


    }

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

        }
       
        protected class TestEndpoint extends Endpoint implements ExchangeProcessor {
            protected ServiceEndpoint activated;
            public void activate() throws Exception {
                ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
                activated = ctx.activateEndpoint(service, endpoint);
            }
View Full Code Here

            public void activate() throws Exception {
                ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
                activated = ctx.activateEndpoint(service, endpoint);
            }
            public void deactivate() throws Exception {
                ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
                ctx.deactivateEndpoint(activated);
                activated = null;
            }
View Full Code Here

   
    @PostConstruct
    protected void injectPojo() {
        try {
            ComponentContext context = getContext();
            Method mth = pojo.getClass().getMethod("setContext", new Class[] {ComponentContext.class });
            if (mth != null) {
                mth.invoke(pojo, new Object[] {context});
            }
        } catch (Exception e) {
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.isOneway) {
                    context.getDeliveryChannel().send(exchange);
                } else if (CxfBcConsumer.this.isSynchronous()) {
                    context.getDeliveryChannel().sendSync(exchange,
                            timeout * 1000);
                    process(exchange);
                } else {
                    synchronized (CxfBcConsumer.this.messages.get(exchange.getExchangeId())) {
                        context.getDeliveryChannel().send(exchange);
                        CxfBcConsumer.this.messages.get(exchange.getExchangeId()).wait(timeout * 1000);
                    }
                }
            } catch (Exception e) {
                throw new Fault(e);
View Full Code Here

        public ObjectName getExtensionMBeanName() {
            return lifeCycle.getExtensionMBeanName();
        }

        public void init(ComponentContext context) throws JBIException {
            ComponentContext contextToUse = context;
            if (this.context == null) {
                this.context = context;
            }
            if (contextToUse == null) {
                contextToUse = this.context;
View Full Code Here

        return undeploymentOptions;
    }
   
    private boolean isPrivateMBeanRegistered() {
        try {
            ComponentContext jbiContext =
                    JavaEEServiceEngineContext.getInstance().getJBIContext();
            ObjectName privateMBeanName =
                    jbiContext.getMBeanNames().createCustomComponentMBeanName("JavaEEDeployer");
            boolean isPrivateMBeanRegistered =
                    jbiContext.getMBeanServer().isRegistered(privateMBeanName);
            logger.log(Level.FINE,
                    "isPrivateMBeanRegistered = " + isPrivateMBeanRegistered);
            return isPrivateMBeanRegistered;
        } catch(Exception ex) {
            logger.log(Level.SEVERE, ex.getMessage(), ex);
View Full Code Here

            // Create MessageExchange
            MessageExchangeFactory factory =
                    channel.createExchangeFactoryForService(service);
            me =  oneWay ? factory.createInOnlyExchange() : factory.createInOutExchange();
            me.setService(service);
            ComponentContext context = JavaEEServiceEngineContext.getInstance().getJBIContext();
            me.setEndpoint(context.getEndpoint(service, endpointName));
            me.setOperation(operation);
            meTransport = MessageExchangeTransportFactory.getHandler(me);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw new RuntimeException(ex);
View Full Code Here

     *
     * @see org.apache.servicemix.common.Endpoint#activate()
     */
    public void activate() throws Exception {
        logger = this.serviceUnit.getComponent().getLogger();
        ComponentContext ctx = getServiceUnit().getComponent()
                .getComponentContext();
        channel = ctx.getDeliveryChannel();
        exchangeFactory = channel.createExchangeFactory();
        activated = ctx.activateEndpoint(service, endpoint);
        start();
    }
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.