Examples of Exchange


Examples of org.apache.ode.bpel.pmapi.CommunicationType.Exchange

        }

        final List<Exchange> exchangeList = r.getExchangeList();

        for (int i = 1; i < exchangeList.size(); i++) {
            Exchange e = exchangeList.get(i);
            // We skip failures, because INVOKE_CHECK job is not handled by
            // replayer
            if (e.getType() == ExchangeType.P && !e.isSetFailure()) {
                answers.add(e);
            }
        }

        {
            final Exchange e = exchangeList.get(0);

            final Date time = e.getCreateTime().getTime();
            scheduler.scheduleReplayerJob(new Callable<Void>() {
                public Void call() throws Exception {
                    __log.debug("initial call " + e);

                    final BpelProcess p = bpelEngine.getNewestProcessByType(r.getProcessType());
                    final ProcessDAO processDAO = p.getProcessDAO();
                    final MyRoleMessageExchangeImpl mex = ReplayerBpelRuntimeContextImpl.createMyRoleMex(e, bpelEngine);

                    p.invokeProcess(mex,
                    // time,
                            new BpelProcess.InvokeHandler() {
                                public boolean invoke(PartnerLinkMyRoleImpl target, RoutingInfo routing, boolean createInstance) {
                                    if (routing.messageRoute == null && createInstance) {
                                        ProcessInstanceDAO newInstance = processDAO.createInstance(routing.correlator);

                                        runtimeContext = new ReplayerBpelRuntimeContextImpl(p, newInstance, new PROCESS(p.getOProcess()), mex,
                                        // time,
                                                ReplayerContext.this);
                                        runtimeContext.setCurrentEventDateTime(time);
                                        runtimeContext.updateMyRoleMex(mex);
                                        // first receive is matched to provided
                                        // mex
                                        runtimeContext.execute();
                                        return true;
                                    } else if (routing.messageRoute != null) {
                                        throw new IllegalStateException("Instantiating mex causes invocation of existing instance " + mex);
                                    }
                                    return false;
                                }
                            }, true);

                    for (int i = 1; i < exchangeList.size(); i++) {
                        Exchange e2 = exchangeList.get(i);
                        if (e2.getType() == ExchangeType.M) {
                            MyRoleMessageExchangeImpl mex2 = ReplayerBpelRuntimeContextImpl.createMyRoleMex(e2, bpelEngine);
                            runtimeContext.updateMyRoleMex(mex2);
                            scheduleInvoke(e2, mex2);
                        }
                    }
View Full Code Here

Examples of org.apache.openjpa.trader.service.Exchange

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        String unit = config.getInitParameter("persistence.unit");
        String mock = config.getInitParameter("mock");
        String serverTrace = config.getInitParameter("server-side-stacktrace");
        _del = ("true".equalsIgnoreCase(mock)) ? new MockTradingService() : new Exchange(unit);
        _translator.setPrintServerSideStackTrace("true".equalsIgnoreCase(serverTrace));
    }
View Full Code Here

Examples of org.apache.qpid.server.exchange.Exchange

        createAllQueues();
        createAllTopicQueues();

        //Register Non-Durable DirectExchange
        Exchange nonDurableExchange = createExchange(DirectExchange.TYPE, nonDurableExchangeName, false);
        bindAllQueuesToExchange(nonDurableExchange, directRouting);

        //Register DirectExchange
        Exchange directExchange = createExchange(DirectExchange.TYPE, directExchangeName, true);
        bindAllQueuesToExchange(directExchange, directRouting);

        //Register TopicExchange
        Exchange topicExchange = createExchange(TopicExchange.TYPE, topicExchangeName, true);
        bindAllTopicQueuesToExchange(topicExchange, topicRouting);

        //Send Message To NonDurable direct Exchange = persistent
        sendMessageOnExchange(nonDurableExchange, directRouting, true);
        // and non-persistent
View Full Code Here

Examples of org.apache.qpid.server.model.Exchange

    @Override
    public void unregisterExchange(String exchangeName)
            throws IOException, JMException, MBeanException
    {
        Exchange theExchange = MBeanUtils.findExchangeFromExchangeName(_virtualHostMBean.getVirtualHost(), exchangeName);
        try
        {
            theExchange.delete();
        }
        catch (IllegalStateException ex)
        {
            final JMException jme = new JMException(ex.toString());
            throw new MBeanException(jme, "Error in unregistering exchange " + exchangeName);
View Full Code Here

Examples of org.apache.servicemix.nmr.api.Exchange

   
    @Test
    public void testUnknownOperation() throws Exception {
        PhaseInterceptor<NMRMessage> interceptor = new NMROperationInInterceptor();
        NMRMessage msg = new NMRMessage(new MessageImpl());
        Exchange me = EasyMock.createMock(Exchange.class);
        EasyMock.expect(me.getOperation()).andReturn(new QName("urn:test", "SayHi")).times(4);
        EasyMock.replay(me);
        msg.put(Exchange.class, me);

        TestApplicationContext ctx = new TestApplicationContext(new String[] {
                S1, S2 });
View Full Code Here

Examples of org.fusesource.ide.jmx.commons.messages.Exchange

      } else if (value != null) {
        headers.put(key, value);
      }
    }
    Set<Entry<String, Object>> entrySet = headers.entrySet();
    return new Exchange(message);
  }
View Full Code Here

Examples of org.springframework.amqp.core.Exchange

      boolean durable = params.containsKey(DURABLE) ? (Boolean) params.get(DURABLE) : false;
      boolean autoDelete = params.containsKey(AUTO_DELETE) ? (Boolean) params.get(AUTO_DELETE) : false;
      Map arguments = params.containsKey(ARGUMENTS) ? (Map) params.get(ARGUMENTS) : null;
      currentRoutingKey = null;

      Exchange exchange = null;
      String name = null;
      if (params.containsKey(NAME)) {
        name = params.get(NAME).toString();
      }
      if (params.containsKey(TYPE)) {
View Full Code Here

Examples of org.switchyard.Exchange

            }
            final ServiceOperation serviceOperation = operations.iterator().next();
            operation = serviceOperation.getName();
        }
       
        Exchange exchange = _serviceRef.createExchange(operation, handler);
        if (_transacted) {
            PolicyUtil.provide(exchange, TransactionPolicy.PROPAGATES_TRANSACTION);
            PolicyUtil.provide(exchange, TransactionPolicy.MANAGED_TRANSACTION_GLOBAL);
        }

        // identify ourselves
        exchange.getContext()
                .setProperty(ExchangeCompletionEvent.GATEWAY_NAME, _gatewayName, Scope.EXCHANGE)
                .addLabels(BehaviorLabel.TRANSIENT.label());

        return exchange;
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.