Package org.jboss.blacktie.jatmibroker.core.transport

Examples of org.jboss.blacktie.jatmibroker.core.transport.Transport


    int correlationId = 0;
    synchronized (this) {
      correlationId = ++nextId;
      log.trace("Allocated next sessionId: " + correlationId);
    }
    Transport transport = getTransport(svc);
    Receiver endpoint = transport.createReceiver(correlationId,
        responseMonitor);
    temporaryQueues.put(correlationId, endpoint);
    log.trace("Added a queue for: " + correlationId);
    // TODO HANDLE TRANSACTION
    String type = null;
    String subtype = null;
    int len = 0;
    byte[] data = null;
    if (toSend != null) {
      data = toSend.serialize();
      type = toSend.getType();
      subtype = toSend.getSubtype();
      len = toSend.getLen();
    }

    String timeToLive = properties.getProperty("TimeToLive");
    int ttl = 0;

    if (timeToLive != null) {
      ttl = Integer.parseInt(timeToLive) * 1000;
    }
    transport.getSender(svc, false).send(endpoint.getReplyTo(), (short) 0,
        0, data, len, correlationId, flags, ttl, type, subtype);
    if ((flags & Connection.TPNOREPLY) == Connection.TPNOREPLY) {
      correlationId = 0;
    }
    log.debug("Returning cd: " + correlationId);
View Full Code Here


        Math.min(Connection.XATMI_SERVICE_NAME_LENGTH, svc.length()));
    int correlationId = 0;
    synchronized (this) {
      correlationId = nextId++;
    }
    Transport transport = getTransport(svc);
    Session session = new Session(this, svc, transport, correlationId);

    Receiver receiver = session.getReceiver();
    // TODO HANDLE TRANSACTION
    String type = null;
View Full Code Here

      log.debug("Closed open service session");
    }

    Iterator<Transport> transports = this.transports.values().iterator();
    while (transports.hasNext()) {
      Transport transport = transports.next();
      log.debug("closing transport");
      transport.close();
      log.debug("closed transport");
    }
    this.transports.clear();
    this.connectionFactory.removeConnection(this);
    log.debug("Close connection finished");
View Full Code Here

    log.debug("Close connection finished");
  }

  private Transport getTransport(String serviceName)
      throws ConnectionException {
    Transport toReturn = transports.get(serviceName);
    if (toReturn == null) {
      try {
        toReturn = TransportFactory.getTransportFactory(properties)
            .createTransport();
      } catch (ConfigurationException e) {
View Full Code Here

    if (serviceSession != null) {
      throw new ConnectionException(Connection.TPEPROTO,
          "Second service session creation attempt, was: "
              + serviceSession.getCd() + " new: " + cd);
    }
    Transport transport = getTransport(name);
    serviceSession = new Session(this, transport, cd, replyTo);
    log.trace("Created the service session: " + cd);
    return serviceSession;
  }
View Full Code Here

TOP

Related Classes of org.jboss.blacktie.jatmibroker.core.transport.Transport

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.