Package javax.jbi.servicedesc

Examples of javax.jbi.servicedesc.ServiceEndpoint


        try {
            CeltixServiceUnit csu = serviceUnits.get(suName);
            assert csu != null;
           
            if (csu.isServiceProvider()) {
                ServiceEndpoint ref = ctx.activateEndpoint(csu.getServiceName(), csu.getEndpointName());
                LOG.fine("activated endpoint: " + ref.getEndpointName()
                         + " service: " + ref.getServiceName());
                csuMap.put(ref, csu);
            }
        } catch (JBIException ex) {
            ex.printStackTrace();
        }
View Full Code Here


                    MessageExchange exchange = channel.accept();
                    if (exchange != null) {
                        // REVISIT: serialized message handling not such a
                        // good idea.
                        // REVISIT: can there be more than one ep?
                        ServiceEndpoint ep = exchange.getEndpoint();
                        CeltixServiceUnit csu = suManager.getServiceUnitForEndpoint(ep);
                        ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
                       
                        try {
                            Thread.currentThread().setContextClassLoader(csu.getClassLoader());
View Full Code Here

                // flow is deadlocked
                executor.execute(new Runnable() {
                    public void run() {
                        try {
                            if (me.getDestinationId() == null) {
                                ServiceEndpoint se = me.getEndpoint();
                                se = broker.getContainer().getRegistry().getInternalEndpoint(se.getServiceName(),
                                        se.getEndpointName());
                                me.setEndpoint(se);
                                me.setDestinationId(((InternalEndpoint) se).getComponentNameSpace());
                            }
                            AbstractJMSFlow.super.doRouting(me);
                        } catch (Throwable e) {
View Full Code Here

    }

    protected boolean isClustered(MessageExchange me) {
        MessageExchangeImpl mei = (MessageExchangeImpl) me;
        if (mei.getDestinationId() == null) {
            ServiceEndpoint se = me.getEndpoint();
            if (se instanceof InternalEndpoint) {
                return ((InternalEndpoint) se).isClustered();
                // Unknown: assume this is not clustered
            } else {
                return false;
View Full Code Here

                TransactionManager tm = (TransactionManager) getTransactionManager();
                if (tm != null) {
                    me.setTransactionContext(tm.getTransaction());
                }
                if (me.getDestinationId() == null) {
                    ServiceEndpoint se = me.getEndpoint();
                    se = broker.getContainer().getRegistry().getInternalEndpoint(se.getServiceName(), se.getEndpointName());
                    me.setEndpoint(se);
                    me.setDestinationId(((InternalEndpoint) se).getComponentNameSpace());
                }
                super.doRouting(me);
            }
View Full Code Here

        start();
    }

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

    }

    public void testSendingToDynamicEndpoint() throws Exception {
        ServiceMixClient client = new DefaultServiceMixClient(jbi);

        ServiceEndpoint se = client.resolveEndpointReference(dynamicURI);
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
View Full Code Here

    }

    @Override
    protected void configureExchange(ServiceMixClient client,
            MessageExchange exchange) {
        ServiceEndpoint endpoint = client.getContext().getEndpoint(
                CamelJbiEndpoint.SERVICE_NAME, "cheese");
        assertNotNull("Should have a Camel endpoint exposed in JBI!", endpoint);
        exchange.setEndpoint(endpoint);
    }
View Full Code Here

        return client.createInOutExchange();
    }

    protected void configureExchange(ServiceMixClient client,
            MessageExchange exchange) {
        ServiceEndpoint endpoint = client.getContext().getEndpoint(
                CamelJbiEndpoint.SERVICE_NAME, "camel:controlBus");
        assertNotNull("Should have a Camel endpoint exposed in JBI!", endpoint);
        exchange.setEndpoint(endpoint);
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.servicemix.common.Endpoint#deactivate()
     */
    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

TOP

Related Classes of javax.jbi.servicedesc.ServiceEndpoint

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.